Hello.
Hopefully somebody has an answer to this.
My website imports a list of contacts from a tab delimited file and sets all the data into an array. I then loop through that array and insert each contact using a stored procedure.
I'm curious if there is a way to insert the whole array with one insert statement, but at the same time get the id field generated for each array item.
Anybody?
Here's the ASP code:
for i=0 to ubound(aryList,1)
strQuery = "EXEC Create_Insert_User " &_
"'" & replace(aryList(i,0),"'","`" & "'," &_
"'" & replace(aryList(i,1),"'","`" & "'," &_
"'" & replace(aryList(i,2),"'","`" & "'," &_
"'" & replace(aryList(i,3),"'","`" & "'"
set objRUsrID = objCnn.Execute(strQuery)
aryUsrId(i) = objRUsrID("id".value
next
Hopefully somebody has an answer to this.
My website imports a list of contacts from a tab delimited file and sets all the data into an array. I then loop through that array and insert each contact using a stored procedure.
I'm curious if there is a way to insert the whole array with one insert statement, but at the same time get the id field generated for each array item.
Anybody?
Here's the ASP code:
for i=0 to ubound(aryList,1)
strQuery = "EXEC Create_Insert_User " &_
"'" & replace(aryList(i,0),"'","`" & "'," &_
"'" & replace(aryList(i,1),"'","`" & "'," &_
"'" & replace(aryList(i,2),"'","`" & "'," &_
"'" & replace(aryList(i,3),"'","`" & "'"
set objRUsrID = objCnn.Execute(strQuery)
aryUsrId(i) = objRUsrID("id".value
next