karthik555
IS-IT--Management
If any one has any idea to do this, will be helpful..
1. I am trying to connect to my SQL Server database using a DSN.
2. I have given UID/PWD (SQL Authentication) in my DSN and have given a default DB.
3. I am trying to execute the following code in VB
<CODE>
Dim oADO As ADODB.Connection
Dim oRS As ADODB.Recordset
Dim str As String
Set oADO = New ADODB.Connection
oADO.ConnectionString = "DSN=myDSN"
oADO.Open
</CODE>
4. I am getting error [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
Thanks in Advance..
Karthik
1. I am trying to connect to my SQL Server database using a DSN.
2. I have given UID/PWD (SQL Authentication) in my DSN and have given a default DB.
3. I am trying to execute the following code in VB
<CODE>
Dim oADO As ADODB.Connection
Dim oRS As ADODB.Recordset
Dim str As String
Set oADO = New ADODB.Connection
oADO.ConnectionString = "DSN=myDSN"
oADO.Open
</CODE>
4. I am getting error [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
Thanks in Advance..
Karthik