Dim cn1 As New OleDbConnection( _Re: Ceating a table in a projects subfolder by not specifiing the whole path(VFP)....



Hi Lenard,

First, be sure you're using the latest FoxPro and Visual FoxPro OLE DB data
provider, downloadable from msdn.microsoft.com/vfoxpro/downloads/updates.

A lot depends on whether you're working with a Database Container (DBC file)
or FoxPro "free" tables. The connection string for free tables points to a
directory so you'd need one connection for the incoming data and one for the
outgoing data. With a DBC you can write to a different directory than where
the DBC is located as follows:

Dim cn1 As New OleDbConnection( _
"Provider=VFPOLEDB.1;Data Source=D:\Temp\TestFolder.dbc;")
cn1.Open()
'-- Make some VFP data to play with
Dim cmd1 As New OleDbCommand( _
"Create Table D:\Temp\TestFolder\TestDBF (Field1 I, Field2 C(10))", cn1)
cmd1.ExecuteNonQuery()
cn1.Close()

--
Cindy Winegarden MCSD, Microsoft Most Valuable Professional
cindy@xxxxxxxxxxxxxxxxxxx


<lenard.palko@xxxxxxxxx> wrote in message
news:1160210573.738783.130910@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I'm working on a project in VFP , and I need to copy a table with
SELECT into another table, but with this the table is created in the
root-folder of the project and I need to create it in a subfolder.
I would appreciate your help .. Thnx


.



Relevant Pages

  • Re: Word mail merge with foxpro
    ... > I am trying to connect to a dbf fine not the database. ... >> I do not think you will be able to open a .dbc using ODBC by selecting ... >> using that approach (in the Select Data Source dialog, ... >>> Firstly the files of type drop down does not give a foxpro option. ...
    (microsoft.public.word.mailmerge.fields)
  • Re: Word mail merge with foxpro
    ... I am trying to connect to a dbf fine not the database. ... > I do not think you will be able to open a .dbc using ODBC by selecting the ... >> but when opening the data source in the mail merge helper I hit problems. ... >> Firstly the files of type drop down does not give a foxpro option. ...
    (microsoft.public.word.mailmerge.fields)
  • Re: Word mail merge with foxpro
    ... is to switch on ODBC logging in the ODBC administrator. ... Would it be possible to try connecting to a .dbc? ... One thing I am unsure of in FoxPro these days is whether dbf have the same ... Unfortunately with no error messages to give us a ...
    (microsoft.public.word.mailmerge.fields)
  • Re: Word mail merge with foxpro
    ... I'm not particularly familiar with FoxPro any more but ... I do not think you will be able to open a .dbc using ODBC by selecting the ... OpenDataSource, e.g. using a User/System DSN called vfpdbc, a .dbc at ... > but when opening the data source in the mail merge helper I hit problems. ...
    (microsoft.public.word.mailmerge.fields)
  • URGENT: FoxPro COM Object
    ... to a FoxPro database (*.dbc file). ... I tried using both OLE-DB ... there are certain code in the foxpro triggers and field ... break the 3rd party app, which is not an option anymore. ...
    (microsoft.public.fox.helpwanted)