T
Terence
Hi,
I am retrieving data from AS/400 database to a worksheet
using QueryTable and I have the following problem.
Part of my code is as follows:
'*********************************************
conString = "ODBC;Driver={Client Access ODBC Driver (32-
bit)};" & _
"System=myAS400;" & _
"Uid=myID;" & _
"Pwd=myPwd"
With ActiveSheet.QueryTables.Add(Connection:=conString1, _
Destination:=Range("A1"), _
Sql:="select * from.....")
.Refresh
End With
'*********************************************
However, the program got failed at the line ".Refresh" and
the error message is:
" Run-time error '1004':
Application-defined or object-defined error "
Then I tried to remove ".Refresh", the program didn't have
any error message but nothing returned to the worksheet.
Anyone knows how to solve this problem?
thanks a lot.
Terence
I am retrieving data from AS/400 database to a worksheet
using QueryTable and I have the following problem.
Part of my code is as follows:
'*********************************************
conString = "ODBC;Driver={Client Access ODBC Driver (32-
bit)};" & _
"System=myAS400;" & _
"Uid=myID;" & _
"Pwd=myPwd"
With ActiveSheet.QueryTables.Add(Connection:=conString1, _
Destination:=Range("A1"), _
Sql:="select * from.....")
.Refresh
End With
'*********************************************
However, the program got failed at the line ".Refresh" and
the error message is:
" Run-time error '1004':
Application-defined or object-defined error "
Then I tried to remove ".Refresh", the program didn't have
any error message but nothing returned to the worksheet.
Anyone knows how to solve this problem?
thanks a lot.
Terence