shimin

shimin

  • NA
  • 3
  • 0

Connect to sql server with .udl file

May 21 2008 1:08 AM
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.
   


Answers (2)