System.InvalidOperationException when attempting to add a record



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.

.



Relevant Pages

  • System.InvalidOperationException when attempting to add record
    ... I am working on a VB.NET application that needs to add records to a FoxPro ... populate a DataRow and add it to the dataset. ... Standard stuff I've done many times with SQL Server and Access databases. ... command to specify the index to use. ...
    (microsoft.public.data.oledb)
  • Re: Cannot set CDX index on DBF file from C#
    ... > I am using .NET framework 2.0 to open Foxpro DBF files. ... > the connection / command process, none of the actual indexes ... > within the CDX file are being selected, so when I run a select SQL ... the FoxPro Index command requires exclusive use of the ...
    (microsoft.public.fox.helpwanted)
  • Re: using Select SQL syntax and performance issues
    ... You could use the CREATE CURSOR command to make the cursor and then the ... APPEND FROM command to populate the empty cursor. ... Microsoft FoxPro Technical Support ... I'm new to foxpro but have a VB and sql server background. ...
    (microsoft.public.fox.helpwanted)
  • Re: using Select SQL syntax and performance issues
    ... I'm new to foxpro but have a VB and sql server background. ... > statement as I'm updating all records. ... any sql command I give is very slow. ...
    (microsoft.public.fox.helpwanted)
  • Re: COBOL stored procedure for DB2
    ... Regarding how you precompile the app, you must specify target mfcob to db2 prep, rather than target ibmcob. ... Have you also confirmed that, prior to executing the CALL statement, the host variables specified within the client app have the appropriate values? ... MODIFIES SQL DATA ... confirm the cob command used for creating the SP module. ...
    (comp.lang.cobol)