I have a really strange problem and I hope I've chosen the correct forum.
I have two databases, on separate SQL Server 2000 servers. On each database i have an application role set up, called HPSImporter. I want to run stored procedures on the database through Access.
This was the first time I had used application roles, and my first attempt at a connection string was:
sqlConn.Open "User ID=HPSIMPORTER;PWD=blue;Initial Catalog=TestDatabase;Data Source=TestServerName"
Where 'blue' is the password I'd set up. This worked fine. There wasn't a login named HPSImporter, and HPSImporter wasn't a user on the database (as it was already the name of the role I wouldn't be allowed even if I tried).
I then tried to set this to access the live database - all I did was change the server name (and database name). The application role was set up on the new database in the same way and given the same password. I now get:
"Data source name not found and no defualt driver specifid"
If I add "Provider=SQLOLEDB.1;" to the connection string I am told "login failed for user HPSImporter"
If I change the username and password to sa and the sa password it then works fine.
Why are the two databases on the different servers acting so differently?!
I have two databases, on separate SQL Server 2000 servers. On each database i have an application role set up, called HPSImporter. I want to run stored procedures on the database through Access.
This was the first time I had used application roles, and my first attempt at a connection string was:
sqlConn.Open "User ID=HPSIMPORTER;PWD=blue;Initial Catalog=TestDatabase;Data Source=TestServerName"
Where 'blue' is the password I'd set up. This worked fine. There wasn't a login named HPSImporter, and HPSImporter wasn't a user on the database (as it was already the name of the role I wouldn't be allowed even if I tried).
I then tried to set this to access the live database - all I did was change the server name (and database name). The application role was set up on the new database in the same way and given the same password. I now get:
"Data source name not found and no defualt driver specifid"
If I add "Provider=SQLOLEDB.1;" to the connection string I am told "login failed for user HPSImporter"
If I change the username and password to sa and the sa password it then works fine.
Why are the two databases on the different servers acting so differently?!