Page 1 of 1

General question about OleDb+transaction logic

PostPosted: Fri Jul 25, 2008 1:57 am
by Kiki7
Hi all,

this is not a specific question for TD 5.1, but maybe someone of you can give me a hint how to change my solution. Our old application was running with odbc and in one part of the program we use a named cursor with SqlSetResultSet(...), SqlOpen(...) etc.(Select...For Update...)
Under OleDb this isn`t working any more. The help sais: Note: this function will return an error if called against an OLE DB database connection.
So what is the best way to update my solution? Would you lock the whole transaction before reading the data (this would imply, that the performance goes down) and unlock it after ending the process (that would lock the whole table)? Or is it a better way to set a flag (in a new column) in the table, showing which row is still selected? (more update statement and holding all rows in the cache, because of deleting the flags after process)....
Which kind of solution would you use?

Thanks in advance
Kiki

Re: General question about OleDb+transaction logic

PostPosted: Wed Oct 01, 2008 8:25 am
by herve
Hello,

First, how you open your OLEDB connection ?

Here is the way :

Hello,
:

If you open a session you need to free it with SqlFreeSession :

So the code example used for the SQLRouter/Oracle connection would change from
Set SqlDatabase = ‘oradb’
Set SqlUser = ‘sysadm’
Set SqlPassword = ‘sysadm’
Call SqlConnect(hSql)
….
Call SqlDisconnect(hSql)
to
Set SqlDatabase = ‘oradb’
Set SqlUser = ‘sysadm’
Set SqlPassword = ‘sysadm’
Call SqlCreateSession(hSession, "Provider=OraOLEDB.Oracle;")
Call SqlCreateStatement(hSession, hSql)
….
Call SqlFreeSession(hSession)
where hSession is a declared Session Handle variable.


look at the following documentation :
http://www.guptaworldwide.com/Downloads ... 2OLEDB.pdf

OLEDB page 14.


Regards

Herve

Unable to get connect with Oracle db 11g with TD 6.2

PostPosted: Sun Jul 19, 2015 11:59 am
by srinivas
If anybody having any sample code please provide
At sreeni646@gmail.com