PDA

Click to See Complete Forum and Search --> : MS SQL Configuration for working OK with .NET


adibu
May 3rd, 2002, 09:57 AM
Please tell me what special MSSQL config. must do to convince .NET to open a Data Connection. I had error msg
"Exception of System.InvalidCastException was thrown"
when I try to make an connection.
SQL Server Enterprise Manager, Server, Properties, Connections and what Attribute should I choose ?

Thanks,
Best Regards

Shawn N
May 5th, 2002, 03:42 AM
This is my connection string (sorta):

Data Source=SERVER ADDRESS;UID=USER NAME;PWD=PASSWORD;Initial Catalog=DATABASE NAME

I'm using the System.Data.SqlClient namespace and you can have a connection like this

Dim conSopon As New SqlConnection(Connection String)
conSopon.Open()