Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL 2005 Connections
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Vista
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01260020
Message ID:
01260035
Vues:
15
This message has been marked as the solution to the initial question of the thread.
>Err ODBC
>
>I have a connection string that looks something like this:
>
>driver={SQL Server};DATABASE=TRADLIVE;SERVER=10.0.1.88;UID=sa;pwd=;
>
>I've taken off the pwd value (i.e. it's not really blank).
>
>Thanks
>Simon

OK:
lcString = [driver={SQL Server};DATABASE=TRADLIVE;SERVER=10.0.1.88;]
lnConnection = SQLSTRINGCONNECT(lcString+[UID=sa;PWD=......]) 
IF lnConnection < 0
   lnConnection = SQLSTRINGCONNECT(lcString+[Trusted_Connection=yes]) 
   IF lnConnection < 0
      AERROR(laError)
      MessageBox([Can not connect to SQL Server. Reason: ]+laError[1,2])
      RETURN
   ENDIF
ENDIF
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform