Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Batch updates 1

Status
Not open for further replies.

SirLars

Technical User
Oct 24, 2000
47
CA
hello me again
hehe

i have still not solved this problem with the batch deletes/updates using text delimited sets....

here is my code

Code:
dim playerstodelete, playerstoconfirm

playerstodelete=Request.form("delete")
playerstoconfirm=Request.form("confirm")

dim itstrue
itstrue="True"
sql = "SELECT From Results WHERE ID IN (" & playerstoconfirm & ") AND (" & playerstodelete & ")"
sql2 = "UPDATE Results SET confirmed= "& itstrue &" WHERE ID IN (" & playerstoconfirm & ")"
sql3 = "DELETE FROM Results WHERE ID IN ("& playerstodelete & ")"
accessdb="/fpdb/signup" 
dim DSNstring
DSNstring= "DBQ=" & server.mappath(accessdb) & ";DRIVER={Microsoft Access Driver (*.mdb)}" 

dim objConn
set objConn = Server.CreateObject("ADODB.Connection")
objConn.Connectionstring = DSNstring

objConn.Open 

objConn.Execute sql2
objConn.Execute sql3

objConn.Close
Set objConn = Nothing

why is this not working?

i get this error...

Microsoft OLE DB Provider for ODBC Drivers error '80040e10'

[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.

/tournaments/template/single_elim_16/trimdbase.asp, line 33


is there a better way to do this?
i just need to delete a set of rows and change a boolean value in another column in the other set...
 
yes i saw that shortly after i posted...

and got it to work.. also noticed the problem with the boolean field.. changing it to text "yes" or "no"...

hehe
all these clumps of hair pulled out for naught eh?

hehe
tyvm for posting...

Lars
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top