Re: ADO, ORACLE and retrieve the value
From: Dave (dakotav8_at_verizon.net)
Date: 06/10/04
- Next message: Michael Keating: "Re: Recordset or Object is closed HELP PLEASE!"
- Previous message: Dave: "Re: what is "Multiple-step operation generated errors" Run-time error (80040e21) ?"
- In reply to: Milly: "ADO, ORACLE and retrieve the value"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 10 Jun 2004 09:33:32 -0700
Milly,
I think that the CursorLocation should be adUseServer for this to work.
I use "SELECT MAX("MyIDNumber") AS MyID FROM tblMyTable" as the query. This
will return the last or highest number in the column and works just fine
with any type of database.
This number can be returned by the ADO.Connection.Execute(query).GetString
method. You don't have to use a recordset if your looking for just 1 value.
Dave
"Milly" <Milly@discussions.microsoft.com> wrote in message
news:58C37C79-BDFF-47A1-8043-C5159048D250@microsoft.com...
> Hi all!
>
> I have to find the value of my sequence after the insert in an oracle
database, I'm using ado and vb6:
>
> Set rs = New ADODB.Recordset
> rs.CursorType = adOpenForwardOnly
> rs.CursorLocation = adUseClient
>
> query = "DECLARE Identity NUMBER(11,0):=1; BEGIN INSERT INTO
BC_ONLINE.SysInt_Processo (n_sistemaint, nome_processo,
descrizione_processo, flg_multirec, path_name_frmt_file,
path_name_txt_file, path_name_log_file, flg_Annullato) VALUES ( 1, 'ABI' ,
'prova' , 'N' , yyt' , mmm', ggg' , 'N' ) RETURNING n_Processo INTO Identity
; END;"
>
> rs.Open query
>
> but it doesn't work!!!!
>
> can anyone help me??
>
> thanks!
>
>
- Next message: Michael Keating: "Re: Recordset or Object is closed HELP PLEASE!"
- Previous message: Dave: "Re: what is "Multiple-step operation generated errors" Run-time error (80040e21) ?"
- In reply to: Milly: "ADO, ORACLE and retrieve the value"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|