A FAQ question related to SQL Express - SMS gateway:

I cannot connect to the database server. I have received this error message, what should I do?

Connecting to database (Provider=SQLOLEDB.1;Persist Security Info=False;User ID=myuser;Initial Catalog=mydb;Data Source=mydsn) : 2007-07-25 11:38:25 356:Database plugin 1 : Connection error: Login failed for user 'myuser'. (Provider=SQLOLEDB.1;Persist Security Info=False;User ID=myuser;Initial Catalog=mydb;Data Source=mdsn) :

This means, that the software cannot connect to your database server. Based on the connection string I assume you use Microsoft SQL server. In this case, please use the following connection string:

Provider=SQLNCLI;Server=YourServer;Database=YourDatabase;MultipleActiveResultSets=True;>UID=YourUsername;PWD=YourPassword;

There is a good chance, that the software will be able to connect to your database server as soon as you use this connection string. You might notice that there is no DSN in this connection string. This is because, you need to connect with username/password authentication.

If the connection is not established after switching to this connection string, probably the username and password authentication is not enabled in your registry for MSSQL. To enable it, you should set the following setting in your registry:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\MSSQLServer LoginMode=2

To create a username and a password in Microsoft SQL Server, issue the following command:

sp_addLogin 'ozekiuser', 'ozekipass'
GO
sp_addsrvrolemember 'ozekiuser', 'sysadmin'
GO

After applying these changes, please restart the MS SQL services or your computer.

More information