Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> oo4o and copytoclipboard
I get a EXCEL gpf in opi21.dll when I execute the
copy to clipboard statement below... It will work
if I change the -1 to 1 or change the -1 to
anything upto 795.. If I go past 795 row I get a
GPF again... anyone have any Ideas???
Sub Get_Data()
' Create and initialize the necessary objects
Dim OraSession As Object
Dim OraDatabase As Object
Dim PrjDynaset As Object
Dim ColNames As Object
Set OraSession = CreateObject
("OracleInProcServer.XOraSession")
Set OraDatabase = OraSession.OpenDatabase
("fsdev", "sysadm/sysadm", 0&)
Set PrjDynaset = OraDatabase.DbCreateDynaset
("select Project_Id, Descr from Skip_Projects",
0&)
' Using field array, ie. ColNames
("Project_id").value, is significantly faster
than using
' field lookup, ie. PrjDynaset.fields
("Project_id").value
Set ColNames = PrjDynaset.Fields
' Place column headings on sheet
For icols = 1 To ColNames.Count
Worksheets("DataSheet").Cells(1, icols).Value
= ColNames(icols - 1).Name
Next
' Place data on sheet using CopyToClipboard
PrjDynaset.CopyToClipboard -1
Sheets("DataSheet").Select
Range("A2").Select
ActiveSheet.Paste
'MsgBox "Display Complete"
End Sub
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Fri Sep 24 1999 - 10:18:42 CDT
![]() |
![]() |