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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 5 years later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.