OleDbCommandBuilder insert query will not work? dataset to Access
  Home FAQ Contact Sign in
microsoft.public.data.ado only
 
Advanced search
POPULAR GROUPS

more...

microsoft.public.data.ado Profile…
 Up
OleDbCommandBuilder insert query will not work? dataset to Access         


Author: gibbonas
Date: Feb 28, 2008 14:22

I am trying to take a very strangely delimited text file and put it into
access. So far I was able to get the text file into a dataset and figured
from there I could get it into access. I am trying to use the code below but
the insert query just will not work. I am working with a blank access
database and I am able to get the table and the field names in the
database(with a primary key). I just cannot get the rest of the data. I get
an error that there is incorrect syntax in the insert query. Can someone
please help! I've been all over the site reading a buch of different things
and tried to just write inserts for each row but cannot get that to work
either.
Thank you!

DataSet result = new DataSet();
...get delimited file into dataset...

OleDbConnection DB = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;
Data Source=c:\\Conversions\\" + agencyid + "\\" + agencyid + ".mdb");
Show full article (1.54Kb)
3 Comments
Re: OleDbCommandBuilder insert query will not work? dataset to Access         


Date: Feb 28, 2008 14:33

> Can someone please help! I've been all over the site reading a buch of
> different things
> and tried to just write inserts for each row but cannot get that to work
> either.

What is an DataAdapter and Dataset?
ADO is discussed here (on topic), not ADO.NET (off topic).

Please post .NET related matters to Microsofts .NET newsgroups all of which
have "dotnet" in the name somewhere.

Thank you

Stephen Howe
no comments
Re: OleDbCommandBuilder insert query will not work? dataset to Access         


Author: Frank Hickman
Date: Mar 1, 2008 08:39

"gibbonas" discussions.microsoft.com> wrote in message
news:3B827368-66CF-40C1-B745-062C42E0B585@microsoft.com...
>I am trying to take a very strangely delimited text file and put it into
> access. So far I was able to get the text file into a dataset and figured
> from there I could get it into access. I am trying to use the code below
> but
> the insert query just will not work. I am working with a blank access
> database and I am able to get the table and the field names in the
> database(with a primary key). I just cannot get the rest of the data. I
> get
> an error that there is incorrect syntax in the insert query. Can someone
> please help! I've been all over the site reading a buch of different
> things
> and tried to just write inserts for each row but cannot get that to work
> either.
> Thank you!
>
> DataSet result = new DataSet();
> ...get delimited file into dataset...
> ...
Show full article (2.09Kb)
no comments
Re: OleDbCommandBuilder insert query will not work? dataset to Access         


Author: DDD
Date: Mar 9, 2008 10:31

On Feb 28, 9:22 pm, gibbonas discussions.microsoft.com>
wrote:
> I am trying to take a very strangely delimited text file and put it into
> access. So far I was able to get the text file into a dataset and figured
> from there I could get it into access. I am trying to use the code below but
> the insert query just will not work. I am working with a blank access
> database and I am able to get the table and the field names in the
> database(with a primary key). I just cannot get the rest of the data. I get
> an error that there is incorrect syntax in the insert query. Can someone
> please help! I've been all over the site reading a buch of different things
> and tried to just write inserts for each row but cannot get that to work
> either.
> Thank you!
>
> DataSet result = new DataSet();
> ...get delimited file into dataset...
>
> OleDbConnection DB = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;
> Data Source=c:\\Conversions\\" + agencyid + "\\" + agencyid + ".mdb");
> ...
Show full article (1.79Kb)
no comments