T
tshad
I have the following VS2003 code where I am getting an error on the Sql
Connection that is on the same machine.
My code snippet is:
**********************************
Imports System
Imports System.Data
Imports System.Data.SqlClient
....
Public Function AddUser() As Boolean
Dim dbReader As SqlDataReader
Dim objConn As SqlConnection
Dim ConnectionString As String = "DON\AW_INSTANCE;Initial Catalog=Irez;User
ID=xxx;Password=yyy;"
Try
objConn = New SqlConnection(ConnectionString)
Catch ex As Exception
Console.WriteLine("Error at connection with connection = {0}",
ex.Message)
End Try
***********************************
At the objConn = New SqlConnection line I am getting an exception:
"Keyword not supported: 'don\aw_instance;initial catalog'."
This is the same Connection string I have in my web.config file for my web
page and that works fine.
This is in a program I am building and both program and web site are on the
same machine as the Sql Server.
What would cause this problem?
Thanks,
Tom
Connection that is on the same machine.
My code snippet is:
**********************************
Imports System
Imports System.Data
Imports System.Data.SqlClient
....
Public Function AddUser() As Boolean
Dim dbReader As SqlDataReader
Dim objConn As SqlConnection
Dim ConnectionString As String = "DON\AW_INSTANCE;Initial Catalog=Irez;User
ID=xxx;Password=yyy;"
Try
objConn = New SqlConnection(ConnectionString)
Catch ex As Exception
Console.WriteLine("Error at connection with connection = {0}",
ex.Message)
End Try
***********************************
At the objConn = New SqlConnection line I am getting an exception:
"Keyword not supported: 'don\aw_instance;initial catalog'."
This is the same Connection string I have in my web.config file for my web
page and that works fine.
This is in a program I am building and both program and web site are on the
same machine as the Sql Server.
What would cause this problem?
Thanks,
Tom