System.InvalidOperationException when attempting to add a record
- From: JMB <JMB@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 28 Jun 2005 09:00:03 -0700
I am working on a VB.NET application that needs to add records to a FoxPro
table. I create a dataset, populate a DataRow and add it to the dataset.
Standard stuff I've done many times with SQL Server and Access databases.
When I do the Update method on the dataset I get the following error:
System.InvalidOperationException: Dynamic SQL generation is not supported
against a SelectCommand that does not return any base table information.
I'm guessing it's because the base table does not have a primary key. The
table does have an index (CDX file). In FoxPro, I'd do a SET ORDER TO...
command to specify the index to use. If that is the problem, how would I do
that in VB.NET?
This table has 119 columns in it, many of which are text and can contain any
user input values. As a result, I don't want to attempt to do a SQL Insert
Into command.
Any suggestions? Thanks in advance.
.
- Follow-Ups:
- Re: System.InvalidOperationException when attempting to add a record
- From: Val Mazur \(MVP\)
- Re: System.InvalidOperationException when attempting to add a record
- Prev by Date: Install MDAC via AD
- Next by Date: Re: Oracle to Excel Export - Lots of records need speed
- Previous by thread: Install MDAC via AD
- Next by thread: Re: System.InvalidOperationException when attempting to add a record
- Index(es):
Relevant Pages
|