Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using SQL Server without using *any* VFP table
Message
De
10/02/2005 09:33:44
 
 
À
10/02/2005 08:51:31
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00985130
Message ID:
00985547
Vues:
38
>>Things started to get clear (still have a long road to run...), also got valuable information in VFPCommandSQLStringConnect and related pages.
>
>Update
>
>Made some tests (see below) and it worked fine. Think it'll solve wonderfully one of my deployment issues.
>
>
> cDSNLess = "driver={Microsoft ODBC para Oracle};server=myserver;uid=myuser;pwd=mypassword"
>
> nConnHandle = SQLstringConnect (cDSNLess)
>
> If nConnHandle < 0
>    Messagebox ("SQLstringConnect () error")
>    Return
> endif
>[SNIP]


Good. You can also use CursorAdapter for this if you want.

Also note that from a security standpoint you may not want to code
cDSNLess = "driver={Microsoft ODBC para Oracle};server=myserver;uid=myuser;pwd=mypassword"
but
cDSNLess = "driver={Microsoft ODBC para Oracle};server="+m.cServer+";uid="+m.cUser+";pwd="+m.cPassword
where the variable sare read from an encrypted source and decrypted at runtime.
If you hard-code them in your connection string they are visible in the EXE.


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform