Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Database path in Access
Message
 
À
01/02/2008 07:35:21
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Oracle
Divers
Thread ID:
01287882
Message ID:
01287885
Vues:
9
>Dear Experts,
>
>I use following procedure to connect MS Access database, this work fine in the directory shown in code as e:\asoft\db1
>
>
>public myconnection
>myconnection = sqlstringconnect("Driver={Microsoft Access Driver (*.mdb)};Dbq=e:\asoft\db1;Uid=admin;Pwd=")
>* db1 is mdb name
>sqlexec(myconnection,"select * from table1", 'cursor1')
>
>if myconnection>0
>	thisform.label5.caption="Connected"
>else
>	thisform.label5.caption="Not Connect"
>endif
>
>
>How to adjust following path
>
>path1=Sys(5)+Alltrim(Sys(2003))
>
>I try to use this line but it displays error
>
>path1=Sys(5)+Alltrim(Sys(2003))
>myconnection = sqlstringconnect("Driver={Microsoft Access Driver (*.mdb)};Dbq="+path1+"\asoft\db1;Uid=admin;Pwd=")
TEXT TO lcString NOSHOW PRETEXT 15 TEXTMERGE
     Driver={Microsoft Access Driver (*.mdb)};Dbq=<<Sys(5)+Sys(2003)>>\asoft\db1.mdb;Uid=admin;Pwd=
ENDTEXT

myconnection = sqlstringconnect(lcString)
IF ....
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform