Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

writing data into a recordset with oracle?

Status
Not open for further replies.

macl

Programmer
Sep 15, 2004
65
DE
Hi everybody i have a problem
I have a programme that got its data from a access database
i used to do that with a recordset which i get with this function

'setting the recordset
Set GetData1 = New adodb.Recordset

'execute the SQL-Query
GetData1.Open strSQL, conDB, adOpenForwardOnly, adLockBatchOptimistic

Set rsOutput = GetData1

so far that works in oracle as well
now in access if i wanted to write data into that recordset i did that like that:

currentrecordset.AddNew
currentrecordset.Fields(0) = "Data1"
currentrecordset.Fields(1) = "Data2"
currentrecordset.UpdateBatch

here i have problems with the oracle database
i get this errormessage:

Run-time error'3251':
Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype

I already tried using different locktypes but had no succes with that :(
is there something wrong with the update batch?
does somebody know what is wrong here?

Thanks a real lot :)
 
You generally can't do batch updates on a 'Forward only' cursor. Direct from VBHelp:

CursorType_Property said:
for batch updates you should use either a keyset or static cursor. Set the LockType property to adLockBatchOptimistic and the CursorLocation property to adUseClient to enable the Cursor Service for OLE DB, which is required for batch updates.

You will also need to check out supported cursor/locktype availability with your specific database driver

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'If we're supposed to work in Hex, why have we only got A fingers?'

for steam enthusiasts
 
Hi i changed the cursertype to adUseClient but i still get the same errormessage :(
i didnt understand what you mean with

"You will also need to check out supported cursor/locktype availability with your specific database driver"

how do i do that?

Thanks a lot :)
 
1. Did you change the cursor type (adOpenForwardOnly) or just the cursor location (adUseClient). It's the Forwardonly bit that will stop you!
2. I don't know enogh about the specific datbase driver you're using t know if it supports the lock type and cursor type that you're asking for. You'll have to read the manual for that.

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'If we're supposed to work in Hex, why have we only got A fingers?'

for steam enthusiasts
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top