![]() |
|
Archives of the TeradataForumMessage Posted: Fri, 17 Mar 2006 @ 09:57:31 GMT
Hi, Anyone can provide me sample odbc application to connect to Teradata. I have developed the code. But it was giving an error Provider not found.. Pls. help. I enclose the code for your review.
Private objConn As New ADODB.Connection 'Connection...
Private objRS As New ADODB.Recordset 'Recordset...
Private objErr As ADODB.Error 'Errors...
Sub Auto_open()
'Connect to database using DSL set in the ODBC setup...
objConn.Open "Provider=Teradata;Driver=teracon; Server=10.180.442.24;
Database=dbc; UID=a567014; PWD=sdsdsd"
objConn.Open
'Check for errors...
If objConn.State = adStateOpen Then 'If connection succeeded, continue...
objRS.Open "SELECT * FROM dbc.tables;", objConn 'Issue SQL statement
If Not objRS.EOF And Not objRS.BOF Then 'Check for End or Beginning of File
Debug.Print objRS!State_Name 'Print the contents of the field...
End If
objRS.Close 'Close the recordset...
Else
'Display errors..
For Each objErr In objConn.Errors
Debug.Print objErr.Description
Next
End If
'Release connection to database...
Set objRS = Nothing
Set objConn = Nothing
End Sub
Thanks and regards, Srikanth K.
| ||||||||||||||||||||||||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||
| Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
| Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||