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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run time error '1004' General ODBC error.

Status
Not open for further replies.
Sep 9, 2003
2
SG
I customised a downloadable Macro in Excel sheet that is meant to connect to my Oracle database to do some charting.

Here is an excerpt of the code where the runtime error occurs in line ".Refresh" (second end line).

As I am not a programmer, this really gives me a challenge. Anyone mind to help? Thanks in advance.



strSQl = "select timestamp,mb_used,mb_free " & _
"from v_ora_db_space " & _
"where db_status='" & strDbStatus & "' order by 1"


With ActiveSheet.QueryTables.Add(Connection:=strDbConnection, _
Destination:=Range("A1"), Sql:=strSQl)
ActiveSheet.QueryTables(1).BackgroundQuery = False
.Refresh ' run the query
End With
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top