General question about OleDb+transaction logic

Discussions specific to Team Developer 5.1.

General question about OleDb+transaction logic

Postby Kiki7 » Fri Jul 25, 2008 1:57 am

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
Posts: 35
Joined: Fri Jun 06, 2008 1:21 am
Location: Unterföhring, Germany

Re: General question about OleDb+transaction logic

Postby herve » Wed Oct 01, 2008 8:25 am


First, how you open your OLEDB connection ?

Here is the way :


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)
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 : ... 2OLEDB.pdf

OLEDB page 14.



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

Postby srinivas » Sun Jul 19, 2015 11:59 am

If anybody having any sample code please provide
Posts: 1
Joined: Fri May 29, 2015 11:22 am

Return to Team Developer 5.1

Who is online

Users browsing this forum: No registered users and 2 guests