Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADO connection on Visual Basic .NET

Status
Not open for further replies.

ronnetp

Programmer
Apr 8, 2002
71
I am having problems connecting to SQL Server using
ADO in Visual Basic .NET

I am using this code:

Dim xconexion As ADODB.Connection
Dim xrecordset As ADODB.Recordset
Dim tconexion As String
xrecordset = New ADODB.Recordset()
xconexion = New ADODB.Connection()
tconexion = "uid=test;pwd=test;driver=
SQLServer};server=ENTERPRISE;database=PRODUCTION"
xrecordset.Open("select * from proddta.f0101", tconexion, ADODB.CursorTypeEnum.adOpenDynamic, ADODB.LockTypeEnum.adLockOptimistic)

But it returns this error

An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in Invnetario.exe

Additional information: [Microsoft][Administrador de controladores ODBC] No se encuentra el nombre del origen de datos y no se especificó ningún controlador predeterminado
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top