Connection String for VB with MS SQL Server 2005 Express Edition
-
Hi All, In my application, i am using vb 6.0 as front end and MS-SQL Server 2005 Express Edition as Back End. SQL Server 2005 is installed in another system called Sys2. I am using the following connection string in Visual Basic, to connect to SQL Server. Conn.ConnectionString = "Driver={SQL Native Client};Server=Sys2\SQLEXPRESS;Database=OT_LOG;Trusted_Connection=yes;" But when I try to run the application, its giving the following error: [Microsoft][SQL Native Client][SQL Server]Login failed for user". The user is not associated with a trusted SQL Server connection. Please help me in this issue. Thanks in Advance, Regards,
-
Hi All, In my application, i am using vb 6.0 as front end and MS-SQL Server 2005 Express Edition as Back End. SQL Server 2005 is installed in another system called Sys2. I am using the following connection string in Visual Basic, to connect to SQL Server. Conn.ConnectionString = "Driver={SQL Native Client};Server=Sys2\SQLEXPRESS;Database=OT_LOG;Trusted_Connection=yes;" But when I try to run the application, its giving the following error: [Microsoft][SQL Native Client][SQL Server]Login failed for user". The user is not associated with a trusted SQL Server connection. Please help me in this issue. Thanks in Advance, Regards,
hi http://blogs.msdn.com/sql_protocols/archive/2005/09/28/474698.aspx[^Try this ] Hope it Helps
Vuyiswa Maseko, Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding VB.NET/SQL7/2000/2005 http://vuyiswamb.007ihost.com http://Ecadre.007ihost.com vuyiswam@tshwane.gov.za
-
Hi All, In my application, i am using vb 6.0 as front end and MS-SQL Server 2005 Express Edition as Back End. SQL Server 2005 is installed in another system called Sys2. I am using the following connection string in Visual Basic, to connect to SQL Server. Conn.ConnectionString = "Driver={SQL Native Client};Server=Sys2\SQLEXPRESS;Database=OT_LOG;Trusted_Connection=yes;" But when I try to run the application, its giving the following error: [Microsoft][SQL Native Client][SQL Server]Login failed for user". The user is not associated with a trusted SQL Server connection. Please help me in this issue. Thanks in Advance, Regards,
Look up www.connectionstrings.com[^] - it should give you exactly what you are looking for. HTH
-
Hi All, In my application, i am using vb 6.0 as front end and MS-SQL Server 2005 Express Edition as Back End. SQL Server 2005 is installed in another system called Sys2. I am using the following connection string in Visual Basic, to connect to SQL Server. Conn.ConnectionString = "Driver={SQL Native Client};Server=Sys2\SQLEXPRESS;Database=OT_LOG;Trusted_Connection=yes;" But when I try to run the application, its giving the following error: [Microsoft][SQL Native Client][SQL Server]Login failed for user". The user is not associated with a trusted SQL Server connection. Please help me in this issue. Thanks in Advance, Regards,
If you are using a trusted connection, then your account must be defined on the remote node (Sys2 in your case). A probable better solution is to use a defined account and password; for example: Driver={SQL Native Client};Server=Sys\SQLEXPRESS;Database=OT_LOG;uid=OT_Log_User;pwd=OT_Log_User_PWD The username and password can be stored in the registry, a config file, and INI file, etc. Hope that helps. Tim
-
If you are using a trusted connection, then your account must be defined on the remote node (Sys2 in your case). A probable better solution is to use a defined account and password; for example: Driver={SQL Native Client};Server=Sys\SQLEXPRESS;Database=OT_LOG;uid=OT_Log_User;pwd=OT_Log_User_PWD The username and password can be stored in the registry, a config file, and INI file, etc. Hope that helps. Tim
-
Hi Tim, Thanks lot for your help. Can you give me some idea about that username and password. Is that username and password same as windows username and password or we need to create specific for this. If so, how to do with that. Regards,
The username and password can be whatever you want; there are defined on the SQLServer end. Create a user account, define the password, and grant access to the database.