#1  
Old 14th May 2020, 09:48 AM
AndyPhotoBell AndyPhotoBell is offline
Junior Member
 
Join Date: May 2020
Posts: 4
Default TnxSessionPool, C++ Builder 2007, Nexus 3.09

Sorry, I'm using an old version of Nexus and an old version of C++ Builder.

I'm trying to get TnxSessionPool to work and can't find any actual example of it.

I'm guessing that my thread needs its own Database component and I need to get a Session from the Session pool for it. My code is this:

DB->Session = SessionPool->AcquireSession();

Problem is, the Database's session property remains NULL afterwards and I can't find a way to force it to accept the session. I've confirmed that the session pool is returning a new session...

Any help would be greatly appreciated.

Andy
  #2  
Old 14th May 2020, 11:36 AM
Eivind Eivind is offline
Administrator
 
Join Date: Mar 2008
Posts: 199
Default

Quote:
Originally Posted by AndyPhotoBell View Post
Sorry, I'm using an old version of Nexus and an old version of C++ Builder.

I'm trying to get TnxSessionPool to work and can't find any actual example of it.

I'm guessing that my thread needs its own Database component and I need to get a Session from the Session pool for it. My code is this:

DB->Session = SessionPool->AcquireSession();

Problem is, the Database's session property remains NULL afterwards and I can't find a way to force it to accept the session. I've confirmed that the session pool is returning a new session...

Any help would be greatly appreciated.

Andy
Well, yes, unless you actually link components together (database->session := your new session)... nothing much will happen.
  #3  
Old 14th May 2020, 09:56 PM
AndyPhotoBell AndyPhotoBell is offline
Junior Member
 
Join Date: May 2020
Posts: 4
Default

What I'm saying is that when I try to link my pooled session to the database, it fails to do so.

I wondered if there was any reason why DB->Session = newPooledSession; fails? No exception is thrown or error message is raised.

I've known C++ Builder sometimes fail to make such assignments in the past, so I'm trying to determine if this is a mistake on my part, its part, or something else.

In any case, I'm now part way though implementing TnxThreadWithDatabase which is connecting things correctly, so I'll use this instead of manually combining everything.


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
3.04 and C Builder 2007 Shane Stump nexusdb.public.support 6 8th May 2010 04:18 AM
Batch files to compile Nexus 2.0803 for C++Builder 2007 =?ISO-8859-1?Q?=22Rodrigo_G=F3mez_=5BNDX=5D=22?= Binaries 0 12th June 2009 09:31 AM
C Builder 2007 (only) Shane Stump Support Newsgroups 2 2nd February 2008 12:27 AM
C Builder 2007 (only) Shane Stump nexusdb.public.support.cbuilder 2 2nd February 2008 12:27 AM
C Builder 2007... Shane Stump nexusdb.public.support.cbuilder 9 22nd January 2008 12:57 PM


All times are GMT +11. The time now is 02:43 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.