SQL Insert statement with VP, ASP gives syntax error

davachi

New Member
Would you know what is wrong with my INSERT statement?

On ODBC connection to a Progress 9.1b I am trying to use an insert statement but getting systax error message:

the code is like this

SET rs2 = Server.CreateObject("ADODB.Recordset")
StrSQL2 = "INSERT INTO PUB.struc_subcc (id) VALUES (301)"
rs2.Open strSQL2, adocon

This is the error message,

Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[MERANT][ODBC PROGRESS driver][PROGRESS]Syntax error (7587)
/local/corprep/addrule.asp, line 114



Is ther e a site or webpage where it address the specific issues with progress SQL?


Thanks in advance.
 

Casper

ProgressTalk.com Moderator
Staff member
Statement looks fine. Are you sure you have permission to update the table and/or the default transaction isolation level is not set at read uncomitted?

Casper.
 

davachi

New Member
Thank you for reply Casper.

Managed to get the insert going, after adding one more column after id!

I am quite new to ASP and SQL, would you know a site or document that helps to understand the differences in accessing Progress databases as oposed to more common ones?

Thanks again

Davachi
 

girish66

New Member
You should enclose the table in quotes here is the correct format for the SQL string

strSQLString = "INSERT INTO PUB.""struc_subcc"" (id) VALUES (301)"

Make sure you have the quotes.
 
Top