سؤال

I've been trying to connect SQL Server with VB6. I'm running Windows 2000 on VMWare. I've been unsuccessful in doing so. The error was on the connection string. How can I find the connection string details.

This is the current connection string:

.ConnectionString = "user ID=" & DBUser & ";password=" & DBPass & ";" + "Data source=" & strservername & ";" + "Initial Catalog= StudentManagementSystem"
        .Provider = "SQLOLEDB.1"

I get the error from err.description

Login failed for user 'dbo.'
هل كانت مفيدة؟

المحلول

After discussing, tried using a trusted connection in the form of

Server=myServerAddress;Database=myDataBase;Trusted_Connection=True;

and after fixing the servername it worked.

نصائح أخرى

Dbo. Is not a user name its a schema. You need to verify the username.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top