error in using udl

Mar 30 2004 8:31 PM
Good day. Im having a problem in using udl to connect to a database.. The Code: Dim con As New OleDb.OleDbConnection() Dim com As New OleDb.OleDbCommand() Dim query As String = "select * from tbltest" con.ConnectionString = "File Name =c:/test.udl" com.Connection = con com.CommandText = query con.Open() con.Close() The udl is set to a sql dsn However, the code generates an exception.. An unhandled exception of type 'System.ArgumentException' occurred in system.data.dll Additional information: The .Net Data OLE DB Provider(System.Data.OleDb) does not support the MSDASQL Provider, Microsoft OLE DB Provider for ODBC Drivers. thnx for ur help

Answers (3)