Hi, I am a newbie in this forum.
I wanna seek help at here, if I want to connect to sqlserver using .udl file, can it?
Imports System.Data.Sqlclient
Private sub button1_click
dim conn as new SqlConnection("FILE NAME = C:\conn.udl")
conn.open
End Sub
I choose Microsoft OLE DB Provider for SQL SERVER in provider tab.
I ever read we can't connect to sql server with 'SqlConnection'
dim conn as new SqlConnection("FILE NAME = C:\conn.udl")
Thanks.
Loading
shiminPosted May 21, 2008, 2:25 AM
So I should use oledbconnection instead of sqlconnection.
and how about if I use SqlDataAdatpter, SqlCommand, Sqldatareader, is it correct?
So what should I do if I don't want to hard code the connection string in my application.
I want user able to change the connection string. is it possible?
Dipal ChoksiPosted May 21, 2008, 1:58 AM