D
Dan Layten
I am relatively new to this, and am trying to connect to an external teradata
database, and run a query against it. The query runs fine against just a
linked table in Access. I am relatively confident that it is connecting,
however I am getting an, "Operation is not supported for this type of
object." Error when I try to run the following code:
Private Sub cmdPop_Click()
Dim dbCurrentDB As DAO.Database
Dim sConnect$
Dim wk As DAO.Workspace
Dim mysql As String
Dim rs As DAO.Recordset
Dim errX As Error
On Error GoTo ODBCErrHandler
mysql = "Select NM_FIRST, NM_LAST FROM MWDW_PRD_ALLVM_HR_EMPLOYEE_V Where
NT_USER_ID =layteda;"
sConnect =
"ODBC;Driver={Teradata};Database=MWDW_ALLVM;DBCname=tddp.ddc.com;UID=;"
Set wk = DBEngine.CreateWorkspace("", "", "", dbUseODBC)
Set dbCurrentDB = wk.OpenDatabase("", False, True, sConnect)
'MsgBox mysql
Set rs = dbCurrentDB.OpenRecordset(mysql)
MsgBox "done"
Any help or suggestions would be appreciated.
Thanks.
database, and run a query against it. The query runs fine against just a
linked table in Access. I am relatively confident that it is connecting,
however I am getting an, "Operation is not supported for this type of
object." Error when I try to run the following code:
Private Sub cmdPop_Click()
Dim dbCurrentDB As DAO.Database
Dim sConnect$
Dim wk As DAO.Workspace
Dim mysql As String
Dim rs As DAO.Recordset
Dim errX As Error
On Error GoTo ODBCErrHandler
mysql = "Select NM_FIRST, NM_LAST FROM MWDW_PRD_ALLVM_HR_EMPLOYEE_V Where
NT_USER_ID =layteda;"
sConnect =
"ODBC;Driver={Teradata};Database=MWDW_ALLVM;DBCname=tddp.ddc.com;UID=;"
Set wk = DBEngine.CreateWorkspace("", "", "", dbUseODBC)
Set dbCurrentDB = wk.OpenDatabase("", False, True, sConnect)
'MsgBox mysql
Set rs = dbCurrentDB.OpenRecordset(mysql)
MsgBox "done"
Any help or suggestions would be appreciated.
Thanks.