Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. sponsors. rss.
 From: Travis Pick
  Where is Travis Pick?
 Marathon
 Canada
 Travis Pick
 Tags
Subject: SQLStringConnect() questions
Thread ID: 210999 Message ID: 210999 # Views: 37 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Databases, Tables and SQL Server
Date: Thursday, January 08, 2009 8:09:09 PM         
   


Good day to you,

I have a SQL server that I am trying to connect to using this connection string.

SQLSTRINGCONNECT("Driver=SQL Server;Server=MPISWEB01\MPIORG;Database=Maximo52;Trusted_Connection=Yes")

I have written an application that, when run as a network administrator equivalent, will connect to SQL server no problem. When the application is run as a regular user, I get a connectivity error to SQL server, specifically from the SQLStringConnect function

When I do an aerror() to get the error message, I am given the following:
Connectivity error: [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'MPI\Itszero'.


MPI is my windows domain, and Itszero is the user I was logged into the network with



So I changed the connection string and got rid of the trusted connection, and made one with Authentication, and I typed in the username and password.

"Driver=SQL Server;Server=MPISWEB01\MPIORG;Database=Maximo52;uid =;pwd = "

After changing the connection string I keep getting the same error. It's like SQL Server doesn't care that I am providing SQL authentication to it, it continues to use windows authentication. My server is set to allow both windows and SQL authentication.


Anyone have any solutions for this, or an idea on a path forward. possibly missing network rights?


Thanks in advance,

Travis Pick



COMPLETE THREAD
SQLStringConnect() questions Posted by Travis Pick @ 1/8/2009 8:09:09 PM
RE: SQLStringConnect() questions Posted by Borislav Borissov @ 1/8/2009 9:01:02 PM
RE: SQLStringConnect() questions Posted by Travis Pick @ 1/9/2009 2:12:24 PM
RE: SQLStringConnect() questions Posted by Cetin Basoz @ 1/8/2009 9:01:06 PM