473,480 Members | 1,774 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Webservice updating local Odbc datasource..

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
1 2277
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2432
by: tango | last post by:
In Excel VBA, I've established an ODBC connection to a SQLServer db, and I can do a successful SELECT query, but I'm having trouble doing an UPDATE query. When I run the following code, I get...
3
1848
by: Tarun Jain | last post by:
Hi, I am trying to create a WebService which uses data stored in a large xml file (200-400 MB). Obviously parsing the xml for every webservice request is not feasible since that would make the...
5
3061
by: Ron | last post by:
I have a bunch of Crystal Reports (v9) published as WebServices and use a ReportViewer to display the reports on the ASPNET page. Everytime we move the reports from dev to production we have to...
24
2570
by: Nikolay Petrov | last post by:
In my WebService I have structure Structure myStr1 Dim text as String Dim Key as Byte() End Structure and a Web Method, containing Function which retruns data as this Structure My qustion...
3
7426
by: Dan Slaby | last post by:
I have a webservice that I want to populate a combobox on a windows form. The webservice creates the correct XML output, but when I attempt to bind it to a combobox I get this error: Additional...
1
462
by: MethMath | last post by:
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: Operation must...
5
12485
by: Mark R. Dawson | last post by:
Hi all, I may be missing something with how databinding works but I have bound a datasource to a control and everything is great, the control updates to reflect the state of my datasource when I...
0
1262
by: TheMaxx | last post by:
I need to access ODBC from remote computer, if there's a better way other than WebService please let me know. So, i am doing web service which connects on ODBC, which connects to SqlServer 2000...
10
1794
by: erick-flores | last post by:
Hello all I have been trying to look for the answer to my question doing some search in the groups but no luck. I have linked a table using ODBC. Then I made a copy of the link table to my local...
10
4421
by: Richard | last post by:
Hi folks, thanks for taking the time to read this (and hopefully point our where I'm going wrong). The scenario: I have a local Access2007 database which links in several read only mySql...
0
6904
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7037
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7080
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
6895
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4770
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4476
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2992
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
558
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
176
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.