Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Connection string
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2008
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01528660
Message ID:
01528671
Vues:
57
>>>>What error do you get?
>>>>
>>>>>
>>>>>I'm trying to connect to a SQL database using the below connection string but with no joy. The server name is correct as is the username and password, any ideas?
>>>>>
>>>>>constring = "Driver=SQL Server;Server=SERVER-ACC\SQLEXPRESS;Database=accTrax;uSER iD=user1;Password=password1;Trusted_connection=yes"
>>>>>
>>>>>~M
>>>
>>>two error come up on the screen, error 0 and error 4060. SQL server is running, after the error comes up i get a login screen and can use the same credentials to login. the authentication is sql server and not windows
>>>~M
>>
>>
>>Get rid of the Trusted Connection = yes part. You are using SQL authentication.
>I tried that and also below but still get the same error. I can login fine using sql manager
>Integrated Security=False

Add these lines before creating a connection
*	SQLSETPROP(0, "ConnectTimeOut", .SQL_ConnectTimeout)
		SQLSETPROP(0, "DispWarnings", .F.)
		SQLSETPROP(0, "DispLogin", 3)  && disable login dialog if there is a problem
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform