Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Connection string
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2008
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01528660
Message ID:
01528675
Views:
66
>>>>>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
>
>Are you logging on from SQL Manager from the same machine you are running your app from?
>
>Have you set the SQL server to allow remote connections, use TCP/IP, and allow port 1433 so you can connect remotely?
I can get in using sql manager no problem and remote connections allowed. I've managed to login using
constring = "Driver=SQL Server;Server=SERVER-ACC\SQLEXPRESS; Initial Catalog=acctrax; User Id=user1; Password=password1"

but now this code fails
lcsqlSelect = "SELECT * from isinvoices"
IF SQLEXEC(lnSqlHandler,lcSqlselect,"Cur1") <0
~M
Go raibh maith agat

~M
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform