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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sql error

Status
Not open for further replies.

Andy6666uk

Programmer
Jul 11, 2001
17
GB
Hi there

I keep getting an error telling me that there are "too few parameters" in the second sql statement below. But the table name and all the db field names are correct. Also the two strings being used are making it to the line of code.

Dim oCmd, sql3
Set oCmd = Server.CreateObject("ADODB.Command")
sql3 = "UPDATE Person SET Groups = '" & strGroups & "' WHERE (((Person.PersonID)=" & strPersonID & "));"
oCmd.CommandText = sql3
oCmd.CommandType = adCmdText
Set oCmd.ActiveConnection = db
oCmd.Execute

sql3 = "UPDATE Groups SET Members = '" & strMembers & "' WHERE (((Groups.GroupID)=" & strGroupID & "));"
oCmd.CommandText = sql3
oCmd.Execute

Any help appreciated
Thanks Andy!
 
Do a response.write of the statement in question, you'll soon find the problem ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top