Re: Access mdb file



Hello - can someone please elaborate on this. When I test this the value in
nerg is -1. Do I need to use create connection or something before running
this code or is this code all I need. Are there any step by step
instructions on how to create a query from a table in an mdb file? This
code and the code from the other replies in this thread is not working.

Thanks,

"tom knauf" <hbgmail@xxxxxxxxxx> wrote in message
news:dbfnjj$h1n$02$1@xxxxxxxxxxxxxxxxxxxx
> Hi,
>
> if you just want to read from access (and know/ask user for the
> tablename)
> we use code like this :
>
> cFile = "d:\Daten.mdb"
> cconn = "Driver={Microsoft Access Driver (*.mdb)};Dbq=" + cFile +
> ";Exclusive=1;Uid=admin;Pwd="
> nConn=SQLSTRINGCONNECT(cConn)
> IF nCOnn>0
> nerg = SQLEXEC(nCOnn,'Select * from table1','dummy2')
> if nerg>0 && Now data is in cursor dummy2
> SELECT dummy2
> browse && or so
> endif
> SQLDISCONNECT(nConn)
> ENDIF
> CLOSE DATABASES
>
> You do NOT need a sqlserver or msde, just installed acces or installed
> access odbc drivers.
>
> HTH
> Tom
>
>
>
>
> "Jan" <nomail@xxxxxxxxxxx> schrieb im Newsbeitrag
> news:uyoDTfdiFHA.3336@xxxxxxxxxxxxxxxxxxxxxxx
>> Hi all,
>>
>> I have a small app that does some reporting from legacy dbf files. The
>> app
>> that created the dbf files has been migrated to a windows app and now
>> produces mdb files. What do I need to access mdb files from vfp? I would
>> like to add this as an option to my existing reporting app so that the
> user
>> can choose from their older files or their newer ones to produce the
> report.
>>
>> Some sample code would be useful as would a pointer to the available
> syntax
>> to do this.
>>
>> TIA
>> Jan
>>
>>
>
>


.



Relevant Pages

  • Re: QRe: Legacy Access 2 VB 4 app, Word 11 merge on XP Pro SP2 client
    ... I would simply write a short interim app ... > linked tables to connect to the data in the legacy .mdb files. ... it's not a DLL but essentially the whole of Access 2.0 with the ... > location for your Office 2003 installation, ...
    (microsoft.public.access.conversion)
  • Re: Access mdb file
    ... > I have a small app that does some reporting from legacy dbf files. ... What do I need to access mdb files from vfp? ...
    (microsoft.public.fox.programmer.exchange)
  • Re: Access mdb file
    ... if you just want to read from access (and know/ask user for the tablename) ... > I have a small app that does some reporting from legacy dbf files. ... What do I need to access mdb files from vfp? ...
    (microsoft.public.fox.programmer.exchange)
  • Re: Linking to tables in Firebird or other db
    ... > I have an Access 2003 application that is split into two .mdb files for ... > the interfaces and data. ... This app is distributed on a CD to be used on ... > sent on CD so that the user only needs to replace a single file. ...
    (comp.databases.ms-access)
  • Access mdb file
    ... I have a small app that does some reporting from legacy dbf files. ... What do I need to access mdb files from vfp? ...
    (microsoft.public.fox.programmer.exchange)