Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Code a button and Macro to Insert data to an Oracle Database BI_Guy Excel Programming 0 July 6th 07 06:50 PM
How do I detect and commit the current cell edition? [email protected] Excel Programming 5 April 11th 06 04:40 AM
Connect to Oracle using Microsoft ODBC for Oracle Kent Excel Programming 2 January 18th 06 03:53 AM
ODBC data insert to Oracle renee New Users to Excel 0 October 18th 05 08:37 PM


All times are GMT +1. The time now is 02:58 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"