Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old February 22nd, 2006, 10:25 AM
sam
Guest
 
Posts: n/a
Default INSERT INTO Acess 2K table from Visual FoxPro DBF

I need to append to an existing table from a FoxPro DBF and I can't get
the syntax right.
I can open a recordset:

cnxn.Open "Driver={Microsoft Visual FoxPro
Driver};SourceType=DBF;SourceDB=h:\relayer\files;E xclusive=No"
rs.Open ("select cust.* from cust"), cnxn

I can work round my problem but would like to use INSERT INTO...
FROM... IN
Can anyone help with the syntax?

Thanks

  #2  
Old February 22nd, 2006, 11:05 AM
Arvin Meyer
Guest
 
Posts: n/a
Default Re: INSERT INTO Acess 2K table from Visual FoxPro DBF

You either need to walk through the recordset and add the records 1 by 1
(slower) or use something like:

INSERT INTO MyOtherTable
SELECT Cust.*
FROM Cust;
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access

"sam" <samdalal@spl.at> wrote in message
news:1140603345.317741.111420@o13g2000cwo.googlegr oups.com...[color=blue]
> I need to append to an existing table from a FoxPro DBF and I can't get
> the syntax right.
> I can open a recordset:
>
> cnxn.Open "Driver={Microsoft Visual FoxPro
> Driver};SourceType=DBF;SourceDB=h:\relayer\files;E xclusive=No"
> rs.Open ("select cust.* from cust"), cnxn
>
> I can work round my problem but would like to use INSERT INTO...
> FROM... IN
> Can anyone help with the syntax?
>
> Thanks
>[/color]


  #3  
Old February 22nd, 2006, 12:25 PM
sam
Guest
 
Posts: n/a
Default Re: INSERT INTO Acess 2K table from Visual FoxPro DBF

Doesn't work Arvin, I think I need an IN statement that identifies the
path and the database type similar to the connection string.

Arvin Meyer wrote:[color=blue]
> You either need to walk through the recordset and add the records 1 by 1
> (slower) or use something like:
>
> INSERT INTO MyOtherTable
> SELECT Cust.*
> FROM Cust;
> --
> Arvin Meyer, MCP, MVP
> Microsoft Access
> Free Access downloads
> http://www.datastrat.com
> http://www.mvps.org/access
>
> "sam" <samdalal@spl.at> wrote in message
> news:1140603345.317741.111420@o13g2000cwo.googlegr oups.com...[color=green]
> > I need to append to an existing table from a FoxPro DBF and I can't get
> > the syntax right.
> > I can open a recordset:
> >
> > cnxn.Open "Driver={Microsoft Visual FoxPro
> > Driver};SourceType=DBF;SourceDB=h:\relayer\files;E xclusive=No"
> > rs.Open ("select cust.* from cust"), cnxn
> >
> > I can work round my problem but would like to use INSERT INTO...
> > FROM... IN
> > Can anyone help with the syntax?
> >
> > Thanks
> >[/color][/color]

  #4  
Old February 23rd, 2006, 03:35 AM
David W. Fenton
Guest
 
Posts: n/a
Default Re: INSERT INTO Acess 2K table from Visual FoxPro DBF

"sam" <samdalal@spl.at> wrote in
news:1140610702.608867.116790@g44g2000cwa.googlegr oups.com:
[color=blue]
> Doesn't work Arvin, I think I need an IN statement that identifies
> the path and the database type similar to the connection string.[/color]

Can't you just link to the DBF files directly?

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
  #5  
Old February 23rd, 2006, 01:05 PM
sam
Guest
 
Posts: n/a
Default Re: INSERT INTO Acess 2K table from Visual FoxPro DBF

Yes David, but this is not about resolving a problem but rather
learning something new.

David W. Fenton wrote:[color=blue]
> "sam" <samdalal@spl.at> wrote in
> news:1140610702.608867.116790@g44g2000cwa.googlegr oups.com:
>[color=green]
> > Doesn't work Arvin, I think I need an IN statement that identifies
> > the path and the database type similar to the connection string.[/color]
>
> Can't you just link to the DBF files directly?
>
> --
> David W. Fenton http://www.dfenton.com/
> usenet at dfenton dot com http://www.dfenton.com/DFA/[/color]

  #6  
Old February 23rd, 2006, 09:45 PM
David W. Fenton
Guest
 
Posts: n/a
Default Re: INSERT INTO Acess 2K table from Visual FoxPro DBF

"sam" <samdalal@spl.at> wrote in
news:1140699327.401350.155770@z34g2000cwc.googlegr oups.com:
[color=blue]
> David W. Fenton wrote:[color=green]
>> "sam" <samdalal@spl.at> wrote in
>> news:1140610702.608867.116790@g44g2000cwa.googlegr oups.com:
>>[color=darkred]
>> > Doesn't work Arvin, I think I need an IN statement that
>> > identifies the path and the database type similar to the
>> > connection string.[/color]
>>
>> Can't you just link to the DBF files directly?[/color]
>
> Yes David, but this is not about resolving a problem but rather
> learning something new.[/color]

Well, then you should check the connect string on the linked DBF
file and model your IN statement in the SQL on that.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles