Accessing Paradox Tables From C# Using ODBC

G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top