Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL 2005 Connections
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Vista
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01260020
Message ID:
01260035
Views:
14
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform