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
Bruce Johnson [C# MVP] - 21 May 2005 14:36 GMT
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.

Signature
Bruce Johnson [C# MVP]
http://www.objectsharp.com/blogs/bruce
> 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
[quoted text clipped - 26 lines]
>
> MethMath