<%@LANGUAGE="VBSCRIPT"%><% ' *** Insert Record: construct a sql insert statement and execute it MM_editAction = CStr(Request("URL")) If (Request.QueryString <> "") Then MM_editAction = MM_editAction & "?" & Request.QueryString End If If (CStr(Request("MM_insert")) <> "") Then MM_tableName = "tblDownload" MM_fields = "txtName,fldName,',none,'',txtCompany,fldCompany,',none,'',txtPosition,fldPosition,',none,'',txtAddress,fldAddress,',none,'',txtPhone,fldPhone,',none,'',txtEmail,fldEmail,',none,''" MM_redirectPage = "downloads/validate.asp" ' create the insert sql statement MM_tableValues = "" MM_dbValues = "" MM_fieldsArray = Split(MM_fields, ",") For i = LBound(MM_fieldsArray) To UBound(MM_fieldsArray) Step 5 FormVal = CStr(Request.Form(MM_fieldsArray(i))) Delim = MM_fieldsArray(i+2) If (Delim = "none") Then Delim = "" AltVal = MM_fieldsArray(i+3) If (AltVal = "none") Then AltVal = "" EmptyVal = MM_fieldsArray(i+4) If (EmptyVal = "none") Then EmptyVal = "" If (FormVal = "") Then FormVal = EmptyVal Else If (AltVal <> "") Then FormVal = AltVal ElseIf (Delim = "'") Then ' escape quotes FormVal = "'" & Replace(FormVal,"'","''") & "'" Else FormVal = Delim + FormVal + Delim End If End If If (i <> LBound(MM_fieldsArray)) Then MM_tableValues = MM_tableValues & "," MM_dbValues = MM_dbValues & "," End if MM_tableValues = MM_tableValues & MM_fieldsArray(i+1) MM_dbValues = MM_dbValues & FormVal Next MM_insertStr = "insert into " & MM_tableName & " (" & MM_tableValues & ") values (" & MM_dbValues & ")" ' finish the sql and execute it Set MM_insertCmd = Server.CreateObject("ADODB.Command") MM_insertCmd.ActiveConnection = "dsn=systemagicsmart" MM_insertCmd.CommandText = MM_insertStr MM_insertCmd.Execute ' redirect with URL parameters If (MM_redirectPage = "") Then MM_redirectPage = CStr(Request("URL")) End If If (InStr(1, MM_redirectPage, "?", vbTextCompare) = 0 And (Request.QueryString <> "")) Then MM_redirectPage = MM_redirectPage & "?" & Request.QueryString End If Call Response.Redirect(MM_redirectPage) End If %> <% set rsDownload = Server.CreateObject("ADODB.Recordset") rsDownload.ActiveConnection = "dsn=systemagicsmart" rsDownload.Source = "SELECT * FROM tblDownload" rsDownload.CursorType = 0 rsDownload.CursorLocation = 2 rsDownload.LockType = 3 rsDownload.Open rsDownload_numRows = 0 %> SMART Group
Login to Members Area

Contact Us Membership Feedback Sitemap Home
For the Advancement of Surface Mount and Related Technologies

About Us
Statement of Aims
Events
Diary
Surveys
smart-e-products
Committee
Press Releases
Awards
smart-e-link
Book Reviews
Downloads
Link List
Downloads Section
Welcome to the SMART Group download page which provides a wide range of technical articles all related to the assembly process we us in modern manufacture today. Articles are also provided on common process defects, which again may assist you to solve problems you may have in manufacture. Each of the files can be downloaded in pdf file format for future reference.

To access our download area you will need to complete the short form below with your details before we transfer you to our download page.

Name:
Company:
Position:
Full Address:
Phone Number:
E-mail Address:
| © 2001 The SMART Group | Site maintained by Systemagic | Edited by Peter Swanson & Bob Willis |