473,545 Members | 1,956 Online
Bytes | Software Development & Data Engineering Community
+ 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
OdbcExceptionEr ror:

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.Odb c.OdbcConnectio n
OdbcConnection1 .ConnectionStri ng = "DSN=MyDB"
OdbcConnection1 .Open()
cc.CommandText = "INSERT INTO TAB (Col1,Col2,Col3 ) VALUES('" & arg1 & "','"
& arg2 & "','" & arg3 & "')"
cc.Connection = OdbcConnection1
retval = cc.ExecuteNonQu ery()
OdbcConnection1 .Close()

where connectionstrin g 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 2286
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
OdbcExceptionEr ror:

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.Odb c.OdbcConnectio n
OdbcConnection1 .ConnectionStri ng = "DSN=MyDB"
OdbcConnection1 .Open()
cc.CommandText = "INSERT INTO TAB (Col1,Col2,Col3 ) VALUES('" & arg1 & "','"
& arg2 & "','" & arg3 & "')"
cc.Connection = OdbcConnection1
retval = cc.ExecuteNonQu ery()
OdbcConnection1 .Close()

where connectionstrin g 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
2434
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 the error, "Cannot Execute a Select query." Dim dbsCurrent As Database Dim qdfChange As QueryDef Dim rs1 As Recordset
3
1851
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 response very slow. What should I do to make sure that I can load the xml file once and keep it in memory. Then I should be able to use the same...
5
3065
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 open the reports and manually change the datasouce to the production database. Is there a way to set the datasouce on the webserviced reports...
24
2588
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 is, How to expose this structure to my apps, so they can use it?
3
7429
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 information: Cannot bind to property or column FullName on DataSource. This error occurs with the databindings. Here is the code: --
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 use an updateable query. NativeError: -3035 Source: odbcjt32.dll SQL: HY000
5
12499
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 update the datasource - awesome, but I have an issue with updating from a different thread. Here is my datasource, a person class that raises the...
0
1267
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 (Windows auth.) First error was: Login failed for user 'MyComputerNmae\ASPNET'. Then i unchecked "Anonymous acces" from IIS for this webservice
10
1807
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 computer (so my queries can run faster, it was paintful slow with the link table). Everything works fine but the link table changes everytime (it...
10
4430
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 tables via ODBC. The problem:
0
7415
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7928
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7440
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7775
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5997
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
4963
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3470
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1902
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
726
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.