Page 1 of 1

What does OraSession->AssignConnect() exactly do?

Posted: Mon 15 Nov 2004 15:13
by ThomasB
Hi,

I use OraSession->AssignConnect() often, because I have a central db-connection bpl and many other bpls with OraSession-objects in it. On startup of the program, I connect the session in the connection bpl to the db and use AssignConnect() to assign the connection to the sessions in the other bpls.
When looking on the database, I see only one session. Does that mean, that my OraSession-objects are not independend from each other? Does the session with AutoCommit=true affect the other sessions with AutoCommit=false?

Thanks,
Thomas

Posted: Tue 16 Nov 2004 11:17
by Paul
OraSession->AssignConnect copies OCI session handles from the source TOraSession. Thus you can see only one session on Oracle server. It copies connection parameters such as Options.Net, Username, Password, Server, that cannot be changed without reconnection.

Posted: Tue 16 Nov 2004 11:30
by Guest
Hello,

thanks for the answer. That means that two OraSession objects, where one got the connection via AssignConnect() from the other one, are not independend. When I need truely seperated sessions concerning the AutoCommit functionality, I have to create two database sessions, right?

Thanks,
Thomas

Posted: Tue 16 Nov 2004 12:50
by Paul
You can assign the different values of AutoCommit property in two TOraSession objects linked by AssignConnect. They will work in different ways.