I need to insert some data into DB, there is a problem..it gives me an error :
Source line:
SET sql =\"Insert In
In VBScript, VBA and VB5/6, SET
is required to assign an object reference; to assign any other sort of data (including a string), just remove it:
sql = "Insert Into Products (ProductName,SupID,CatID,Price,Pic,Description) Values( '"&pName&"','"&pbId&"','"&pcId&"','"&price&"','"&pic&"','"&desc&"')"
(In VBA and VB5/6 you could also use LET
here.)
The reason SET
works when assigning the result of a Request.Form("foo")
call is because the Form
collection is a collection of objects - the subsequent tests against ""
and "-1"
are valid only because the objects returned have a default parameterless property or method that return a string-compatible variant.