Re: System.InvalidOperationException when attempting to add a reco
- From: JMB <JMB@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 30 Jun 2005 05:57:05 -0700
Thanks for your answer. That along with other reading I have done has
indicated that I can't update FoxPro tables like I would like to using the
DataAdapter. For now, I changed it to use ADODB for my updates and that works
just fine.
"Val Mazur (MVP)" wrote:
> Hi,
>
> When you call Update method of the DataAdapter, then it tries to build
> INSERT, UPDATE and DELETE statements based on SELECT statement that selected
> data. But it does not work with all the providers and in all the situations.
> I believe you need to provide these SQL statements explicitly to resolve
> this issue
>
> --
> Val Mazur
> Microsoft MVP
>
> http://xport.mvps.org
>
>
>
> "JMB" <JMB@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:E17A09F5-34D6-4419-B2D6-FA03A1A8AD44@xxxxxxxxxxxxxxxx
> >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.
> >
>
>
>
.
- References:
- System.InvalidOperationException when attempting to add a record
- From: JMB
- Re: System.InvalidOperationException when attempting to add a record
- From: Val Mazur \(MVP\)
- System.InvalidOperationException when attempting to add a record
- Prev by Date: Re: Cached ADO
- Next by Date: multi recordset error?
- Previous by thread: Re: System.InvalidOperationException when attempting to add a record
- Next by thread: Oracle Connection Problem
- Index(es):
Relevant Pages
|
|