Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating an ODBC via VFP.
Message
De
03/04/2006 10:52:13
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01109907
Message ID:
01109958
Vues:
21
>mmm I set all the parameters... but it doesn't work.. I changed the values:
>
>
>  strAttributes = "SERVER=METAFRAME" + Chr(0)
>  strAttributes = strAttributes + "DESCRIPTION=Temp DSN " + Chr(0)
>  strAttributes = strAttributes + "DSN=DSN_TEMP " + Chr(0)
>  strAttributes = strAttributes + "DATABASE=excepciones " + Chr(0)
>  strAttributes = strAttributes + "UID=" + Chr(0)
>  strAttributes = strAttributes + "PWD=" + Chr(0)
>  intRet = SQLConfigDataSource(vbAPINull, ODBC_ADD_DSN, strDriver, strAttributes)
>
>
>But IntRet returns 0 (zero)
>
>Any further help???


I see Borislav and Vladimir aleady answered. Your sample code was not using DSNless connections with SQLSTRINGCONNECT() as I advised.
Another (unrelated) issue I see in one of the later examples on this thread is the use of user 'sa' which is the Admin. This is a bad idea. System Admin account should only be used for system administration tasks, not for everyday queries and other database daily operations. That is a security risk. Make your programs aleways use a normal user (restricted account) instead of 'sa'.


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
Répondre
Fil
Voir

Click here to load this message in the networking platform