Insert problem using ADO with classic ASP

Posted by Kemal Akcali on Stack Overflow See other posts from Stack Overflow or by Kemal Akcali
Published on 2010-06-02T12:24:00Z Indexed on 2010/06/02 16:34 UTC
Read the original article Hit count: 207

Filed under:
|
|
' Setting variables
 Dim con, sql_insert, data_source

 data_source = "project_db"
 sql_insert = "insert into cart ( UserID,Count,ProductName,ProductDescription,ProductPrice) values ('"&user_id&"','"&count&"','"&product_name&"','"&product_description&"','"&product_price&"')"

 ' Creating the Connection Object and opening the database
 Set con = Server.CreateObject("ADODB.Connection")
 con.Open data_source

 ' Executing the sql insertion code
 con.Execute sql_insert

 ' Done. Now Close the connection
 con.Close
 Set con = Nothing

AS you can see , it is a simple code . and it worked in my local host for 5 or 6 times. but now it didn't work. What's the problem ? I think , it's about my database or memory. i setup 2 different iis in 2 different computer and they behave same... please help..

Thanks

© Stack Overflow or respective owner

Related posts about database

Related posts about query