I've written a neat little app in Visual C# that connects to an MSAccess 2003 database. Because of the really great functionality of ADO.NET, I was able to circumvent a lot of the concurrent connection limitations of Access by using DataSets - alas, I was only delaying the inevitable transition to SQL Server 2000
Since the internal dataset fills in my C# app are written for OLE, and since I've already configured it to connect to the Access database, I was really hopingthat I could just use a linked table to the exported data on SQL Server. However, when I did just this, I got a "ODBC --Call Failed" unhandled exception in my application when I tried to make a simple data change and save it back to the database - no other descriptive error numbers or anything. It appears to be connecting, as I can navigate records, I just cannot make a single change to them, or add new records.
- The changes I made do not propogate, so the MSKB regarding ODBC and cursors isn't the solution
- I did remember to set a PK when I exported from Access to SQL Server 2000
- It's {most likely?} not a permissions issue; I'm in as Administrator, with the ODBC connection set up to use NT Authentication
- I've got SQL Server 2000 running SP3a as well as the latest version of JET running on my 2k3 Server
Any help would be greatly appreciated!
Hi,
as long as Access doenst have a primry key defined on the table it isn′t able to do an update / insert. Try to open the access database and insert a new row in th linked table, i guess it is greyed. Define a PK on the appriate columns and you′ll be fine.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
|||Jens,Thanks for the response. Unfortunately, I had already defined the PK, and it's showing up in Access. I can add records/edit changes in the database using the MSAccess UI... it's just when my C# ADO.NET app tries to do connect to the MS Access file that the problems start manifesting.
Any other ideas?
|||
http://support.microsoft.com/?scid=kb;en-us;303257&spid=2509&sid=49
HTH
No comments:
Post a Comment