By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,682 Members | 1,980 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,682 IT Pros & Developers. It's quick & easy.

Webservice updating local Odbc datasource..

P: n/a
I have problems with a webservice receiving data in turn updating an
Odbc-linked Access database on the same computer. The Odbc engine gives me an
OdbcExceptionError:

Message: [Microsoft][Driver for ODBC Microsoft Access] Operation must use an
updateable query.
NativeError: -3035
Source: odbcjt32.dll
SQL: HY000

The code in webservice is as follows:

OdbcConnection1 = New System.Data.Odbc.OdbcConnection
OdbcConnection1.ConnectionString = "DSN=MyDB"
OdbcConnection1.Open()
cc.CommandText = "INSERT INTO TAB (Col1,Col2,Col3) VALUES('" & arg1 & "','"
& arg2 & "','" & arg3 & "')"
cc.Connection = OdbcConnection1
retval = cc.ExecuteNonQuery()
OdbcConnection1.Close()

where connectionstring points to the systemDSN Odbc datasource.

The strange thing is that when I instead send the data to another
application via TCP, that application updates the database without problems
using exactly the same code.

Does anyone know what might be wrong ?

MethMath
Nov 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
My guess is that the user id under which the web service is being executed
(normally ASPNET) doesn't have write access to the Access database.

Hope that helps.

--
Bruce Johnson [C# MVP]
http://www.objectsharp.com/blogs/bruce
"MethMath" wrote:
I have problems with a webservice receiving data in turn updating an
Odbc-linked Access database on the same computer. The Odbc engine gives me an
OdbcExceptionError:

Message: [Microsoft][Driver for ODBC Microsoft Access] Operation must use an
updateable query.
NativeError: -3035
Source: odbcjt32.dll
SQL: HY000

The code in webservice is as follows:

OdbcConnection1 = New System.Data.Odbc.OdbcConnection
OdbcConnection1.ConnectionString = "DSN=MyDB"
OdbcConnection1.Open()
cc.CommandText = "INSERT INTO TAB (Col1,Col2,Col3) VALUES('" & arg1 & "','"
& arg2 & "','" & arg3 & "')"
cc.Connection = OdbcConnection1
retval = cc.ExecuteNonQuery()
OdbcConnection1.Close()

where connectionstring points to the systemDSN Odbc datasource.

The strange thing is that when I instead send the data to another
application via TCP, that application updates the database without problems
using exactly the same code.

Does anyone know what might be wrong ?

MethMath

Nov 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.