Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
insert into oracle commit
i have vb code
With ActiveSheet.QueryTables.Add(Connection:= _ "ODBC;DRIVER={Microsoft ODBC for Oracle};UID=tkokoska;PWD=mdc75efp;SERVER=point.wor ld;", _ Destination:=Sheet2.Cells(1, 2)) .Sql = "Select user from dual" .Name = "qry" .FieldNames = False .RowNumbers = False .FillAdjacentFormulas = False .PreserveFormatting = True .RefreshOnFileOpen = True .BackgroundQuery = False .RefreshStyle = xlInsertDeleteCells .SavePassword = True .SaveData = True .AdjustColumnWidth = True .RefreshPeriod = 0 .PreserveColumnInfo = True .Refresh BackgroundQuery:=False End With for connect to database and after that i have vb code for insert into oracle table some values Sheet2.QueryTables.Item(1).Sql = "INSERT /*+ append*/ INTO tkokoska.probava VALUES ( " & a & ", sysdate )" Sheet2.QueryTables.Item(1).Refresh if i have single insert at one time, everything is all right with code, but if i insert in loop way - walking through values and issue insert then error ocured. it seems refresh method isn't fast enough.. i got error Run-time error '1004' this operation cannot be done because data is refreshing in the background |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Code a button and Macro to Insert data to an Oracle Database | Excel Programming | |||
How do I detect and commit the current cell edition? | Excel Programming | |||
Connect to Oracle using Microsoft ODBC for Oracle | Excel Programming | |||
ODBC data insert to Oracle | New Users to Excel |