Hi All,
I am running VBA code which connects to Oracle database. Then the SQL query is executed.
And then I am trying to get the data to Excel, using the below piece of code.
fldCount = rsOra.Fields.Count
For iCol = 1 To fldCount
Worksheets("Sheet1").Cells(1, iCol).Value = rsOra.Fields(iCol - 1).Name
Next
Worksheets("Sheet1").Cells(2, 1).CopyFromRecordset rsOra
It works fine to get the column headings but then it falls over (it's running for a few minuts then 'not responding) on line:
Worksheets("Sheet1").Cells(2, 1).CopyFromRecordset rsOra
I need to close and restart excel application. There's about 4000 records to be copied from the database. I wouldn't think this is a lot.
Is there any other way to fetch the data using ADO and recordset?
Thanks a lot.
I am running VBA code which connects to Oracle database. Then the SQL query is executed.
And then I am trying to get the data to Excel, using the below piece of code.
fldCount = rsOra.Fields.Count
For iCol = 1 To fldCount
Worksheets("Sheet1").Cells(1, iCol).Value = rsOra.Fields(iCol - 1).Name
Next
Worksheets("Sheet1").Cells(2, 1).CopyFromRecordset rsOra
It works fine to get the column headings but then it falls over (it's running for a few minuts then 'not responding) on line:
Worksheets("Sheet1").Cells(2, 1).CopyFromRecordset rsOra
I need to close and restart excel application. There's about 4000 records to be copied from the database. I wouldn't think this is a lot.
Is there any other way to fetch the data using ADO and recordset?
Thanks a lot.