|
-
Oct 19th, 2000, 05:25 AM
#1
Thread Starter
Hyperactive Member
Can anyone tell me how to convert this to recordset ?
set rstInsert = cn.Execute (strQuery)
SQLTemp = "INSERT INTO CONTACT ("
SQLTemp = SQLTEMP & rstInsert.Fields(1).Name
FOR i = 1 to rstInsert.Fields.Count -1
SQLTemp = SQLTemp & ","
SQLTemp = SQLTEMP & rstInsert.Fields(i).Name
NEXT
SQLTemp = SQLTemp & ")"
SQLTemp = SQLTemp & "VALUES ("
SQLTemp = SQLTemp & rstInsert(1).Value
FOR i = 1 to rstInsert.Fields.Count - 1
SQLTemp = SQLTemp & ","
SQLTemp = SQLTemp & rstInsert(i).Value
NEXT
SQLTemp = SQLTemp & ")"
cn.Execute SQLTemp
'SQLTemp = "INSERT INTO CONTACT (FIRSTNAME, LASTNAME) VALUES ('GARY','CORCORAN')"
Response.Redirect "MLAdmin.asp?pageid=view"
Its a bloody nightmare recognizing fields that need "strings"
Many thanks
Gary
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|