Connecting to MS SQL


#1

Hello
I have created a database in MS SQL using SQLCmd then when i run my clarion program it gives me an error and tells me my login has failed.
I am using sql authentication and my username and password is correct because i used also in my sqlcmd function and it creates the database. I can just not connect to it when using my clarion program.

Any suggestion?


#2

Elna, What does your connection string look like?


#3

This is my connection string in an ini file:

OwnerName=Servername,dbname,username,password


#4

Are you running your application on the same computer where the SQL Server is running?
If not, you may need to open the firewall for SQL Server.
Is this SQL Server Express Edition? If so, did you enable TCP/IP protocol in the SQL Server Configuration Manager? TCP/IP is not enabled by default with Express Edition.


#5

Hi.
Its been a while but had to see to other things. I’m back at with the same problem as before.

The TCP/IP protocol in the SQL Server Configuration Manager has been enabled and i still have the same problem.
Any other suggestions?


#6

Hi Elna,

ServerName should include the instance eg YourServer\SQLEXPRESS and both username and password are case sensitive.

Graham