Accessing Paradox Tables From C# Using ODBC

From: Steve Barker (SteveBarker_at_discussions.microsoft.com)
Date: 01/11/05


Date: Tue, 11 Jan 2005 08:37:03 -0800

I am trying to access Paradox through a .NET Windows application I am
writing. I have added a Data Connection to the Paradox table in the Server
Explorer of Visual Studio .NET. I have used the "Microsoft OLD DB Provider
for ODBC Drivers" option to make the connection. This works fine... even
though the Paradox table is password protected. I have dragged a the table
from the Server Explorer to my form to make a connection object and a data
adapter. I have also generated a data set from the data adapter. Now, I can
use the data adapter to fill an instance of the data set with no problems. I
noticed though that the data adapter's UpdateCommand, DeleteCommand and
InsertCommand properties are null, so I've created these objects using an
OdbcCommandBuilder. When I try making changes to the data set, and use the
Update method of the data adapter, I get an error! The error is as follows:

System.Data.Odbc.OdbcException: ERROR [HY000] [Microsoft][ODBC Paradox
Driver] Operation must use an updateable query.\r\n at
System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows, DataTableMapping
tableMapping)\r\n at System.Data.Common.DbDataAdapter.Update(DataSet
dataSet, String srcTable)\r\n at
System.Data.Common.DbDataAdapter.Update(DataSet dataSet)\r\n at
ParadoxTest2.Form1.Form1_DoubleClick(Object sender, EventArgs e) in
c:\\visual studio .net\\c#\\paradox test 2\\form1.cs:line 165

Anyone got any ideas why this is happening?!

Thanks in advance for your help!

Steve.



Relevant Pages

  • Re: System.Security.SecurityException {Beginner working with ASP.NET}
    ... seems like the server is runnning with partial trust. ... In the page_load I fill the data adapter, ... grid and close the connection. ... I get this exception when attempting to view my webform in IE6. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Reading Paradox Data
    ... I'm trying to read some Paradox tables using C#. ... Explorer but I can't seem to get the Connection and Data Adapter set up. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Multi-threaded apps and data readers
    ... So if I kept the connection open all ... commands reader, how would I prevent the readers from clashing or do they ... cmd.CommandText = "SELECT AccountName, accountid from accounts" ... I know it is possible because the data adapter class ...
    (microsoft.public.dotnet.framework.adonet)
  • Cannot access Access database
    ... I am a new user developing a Web form in vsnet. ... connection, a data adapter and a data set. ... When I ask to preview the data from the data adapter properties box I ...
    (microsoft.public.vsnet.general)
  • Re: Of Java and C#
    ... Java and missed the c# connection to the class. ... Does checkMeOut() do the work of updating the ... separate commitChanges() method that would update a data store with the ... The modern approach to this is to use a data adapter and a Dataset that are ...
    (comp.lang.cobol)