BryceMT
asked on
I am also trying to connect MS Access to NCR Teradata. I have not been able to connect through ADODB connection - when I try to open the connection I get this error: "Can't find host [MyServer]Cop1
I am trying to connect MS Access to NCR Teradata. Ultimately I want to use Access to send pass through queries to teradata and receive the results. I have not been able to connect through ADODB connection.
Error1: "Can't find host [MyServer]Cop1"
Error2: "10065 WSA E HostUnreach: The teradata server can't currently be reached over this network"
I'm trying to use a standard ADODB connection but it doesn't seem to be working...
Error1: "Can't find host [MyServer]Cop1"
Error2: "10065 WSA E HostUnreach: The teradata server can't currently be reached over this network"
I'm trying to use a standard ADODB connection but it doesn't seem to be working...
Option Compare Database
Option Explicit
Public Sub RunPassThroughQuery() '(SQLString As String)
Dim oConn As ADODB.Connection
Dim oRec As ADODB.Recordset
Dim conStr As String 'connection string
Dim rConn As ADODB.Connection
Dim strDir As String
On Error GoTo ErrorHandle
Set rConn = CurrentProject.Connection
Set oConn = New ADODB.Connection
Set oRec = New ADODB.Recordset
With oConn
.CursorLocation = adUseClient
.CommandTimeout = 3600
.Open "Driver={Teradata};DBCName=[P5450];Database=[IW_Deflt_ProdDB_V];Connect Timeout=3600;Uid= abc;Pwd= 123"
End With
'Run the SQL command on the Teradata warehouse
'oRec.Open SQLString, oConn 'set other attributes if necessary
If oRec.RecordCount < 1 Then
MsgBox "There were no records to import. This is probably a bug, please contact development."
Exit Sub
End If
oRec.Close
oConn.Close
rConn.Close
Exit Sub
ErrorHandle:
MsgBox Error()
Exit Sub
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
After I tried this format:
oConn.Open "Provider=Teradata;" & _
"DBCName=MyDbcName;" & _
"Database=MyDatabaseName;" & _
"Uid=myUsername;" & _
"Pwd=myPassword"
I'm getting this error:
"Provider cannot be found - it may not be properly installed."
oConn.Open "Provider=Teradata;" & _
"DBCName=MyDbcName;" & _
"Database=MyDatabaseName;"
"Uid=myUsername;" & _
"Pwd=myPassword"
I'm getting this error:
"Provider cannot be found - it may not be properly installed."
ASKER
I might need to install a Teradata driver... Has anybody worked with installing teradata drivers in ms access?
ASKER
For now I am using ADO connection object referencing ODBC DSN...
http://msdn.microsoft.com/en-us/library/ms807027.aspx
http://msdn.microsoft.com/en-us/library/ms807027.aspx
ASKER
I need help correcting the connection string or finding some way to establish a connection to Teradata through MS Access. So far, I have successfully execute SQL pass through queries in my Access DB, but I have not been able to open up a connection in VBA with ADODB connection.