Jump to content

[asp] getting script and object required errors.


Recommended Posts

I have a script that is made to update information in a database but I always get a error from this line:

set strSQL2 = "Update titles set title='" & title & "' set type ='" & types & "' set price = '"& price & "' set notes = '" & notes & "' where title_id = '" & id & "'"

it is always either an object required error or a scipt error.What is wrong?

Assuming your using vbscript, there is no such function as set. Try...

 

strSQL2 = "UPDATE titles SET title='" & title & "' SET type ='" & types & "' SET price = '" & price & "' SET notes = '" & notes & "' WHERE title_id = '" & id & "'"

 

If your still having problems, post the line which actually executes this query.

 

PS: Note I also changed SQL specific instructions to caps. This just makes your queries easier to read.

  • 5 years later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.