Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.scripting.vbscript,microsoft.public.dotnet.languages.vb
|
|||
|
|||
![]()
I would like to extract all records from an Oracle database to an Excelsheet.
How do I do this in detail? After googling around I found so far the following code snippet (see bottom). However the "core" statement is still not clear to me. How do I assign the current recordset to the next free line ? How do I write the line indicated below with "***" ? Shouldn't be there a loop to iterate through all records? Function TotalAmount() Dim objConn As ADODB.Connection Dim objRec As ADODB.Recordset strQuery = "SELECT * FROM mytab WHERE field1=123;" If ThisMap.MySQL_connection(objConn, "localhost", "3306", "root", "admin") Then Set objRec = New ADODB.Recordset objRec.Open strQuery, objConn, adOpenForwardOnly, adLockReadOnly "nextfreeline" = CopyFromRecordset objRec (***) Else MsgBox "Error Connection-String" End If objRec.Close Set objRec = Nothing End Function Keith |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
CopyFromRecordset Problem | Excel Discussion (Misc queries) | |||
Format data in Excel after using copyfromrecordset | Excel Discussion (Misc queries) | |||
Excel VBA against Oracle | Excel Discussion (Misc queries) | |||
Problem with Excel and oracle | Excel Discussion (Misc queries) | |||
Excel Access and Oracle | Excel Discussion (Misc queries) |