Hello all,
Question:
Why would my SQL Server not allow me to delete records from the database, while it will allow me to select, append, and update them?
My Problem:
I'm new to SQL Server. I have been useing Microsoft Access 'till now. I have no problems with select, append, update, and delete in Access. Now with SQL Server 7, it will let me do all of those, except delete. I believe I set the permissions for the Temp. Internet User to be able to delete records, however, I'm not positive I did it right.
This is the error I get on the web page:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near ','.
This is the script I used:
sql = "DELETE phone.typeFK, phone.phone, phone.areacode, phone.userFK, phone.phonePK FROM phone WHERE ((phone.userFK)=" & id & "
;"
Set conn = Server.CreateObject("ADODB.Connection"
dsn = "users"
conn.Open dsn
Set rs_main = Server.CreateObject("ADODB.Recordset"
rs_main.Open sql, conn, 3, 3
Can anyone give me pointers to get it to work how I want it to?
Thank you in advance!
-Ovatvvon
Question:
Why would my SQL Server not allow me to delete records from the database, while it will allow me to select, append, and update them?
My Problem:
I'm new to SQL Server. I have been useing Microsoft Access 'till now. I have no problems with select, append, update, and delete in Access. Now with SQL Server 7, it will let me do all of those, except delete. I believe I set the permissions for the Temp. Internet User to be able to delete records, however, I'm not positive I did it right.
This is the error I get on the web page:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near ','.
This is the script I used:
sql = "DELETE phone.typeFK, phone.phone, phone.areacode, phone.userFK, phone.phonePK FROM phone WHERE ((phone.userFK)=" & id & "
Set conn = Server.CreateObject("ADODB.Connection"
dsn = "users"
conn.Open dsn
Set rs_main = Server.CreateObject("ADODB.Recordset"
rs_main.Open sql, conn, 3, 3
Can anyone give me pointers to get it to work how I want it to?
Thank you in advance!
-Ovatvvon