[unixODBC-dev] Re: Problem with threading/Asta

David Keith dkeith at noThis.logisticshealth.spamremove.com
Mon Jul 26 19:28:25 BST 2004

David Keith wrote:
> I've put together an AstaIO daemon written in Kylix/Delphi that uses 
> ODBC Express as it's vendor interface. I'm using FreeTDS to connect to 
> SQL Server 2K.
> When you start the AstaIO daemon it normally creates about 19 instances 
> as checked by using ps -A|grep Asta.
> Because some results weren't coming back correctly in the ExecProc call 
> I started futzing around with the Hdbc component. I set CursorLib from 
> 'Use Driver' to 'Use ODBC'. When I did this and ran a test with the ODBC 
> Express components, I got my result params. But when I tried to start 
> the AstaIO daemon, only one instance showed up in the process list and 
> the server was in a non-responsive state.
> In reading posts on this group I've seen that you can set a 'Threading' 
> option in odbcinst.ini. I've tried '= 0' and '= 50' but that made no 
> difference; with the ' = 50' option I get one non-functioning instance 
> of my server, with ' = 0' I get no instances at all. I've also tried 
> 'Pooling = Yes' and 'Pooling = No' but that seems to make no difference 
> either.
> Thanks for any assistance.
> David Keith
Additional info:

Connection Pooling = cpDefault
CursorLib = Use Driver
DataSource = <valid DSN>
Driver = ''
IsolationLevel = ReadCommitted

BindByName = True
ConcurrencyType = Read Only
CursorType = Dynamic

OEDataSet -
StoredProc = <valid SP>

Whenever I call ExecSQL with the TOEDataSet with Params assigned and a 
result param to be filled I get the following error:

Unable to Retrieve ODBC Error

Here's the code:

     with oedsLogin do
       ParamByName('@CustCode').AsString := Customer;
       ParamByName('@Username').AsString := User;
       ParamByName('@Password').AsString := Pass;
       LogMessage('ValidateLogin: ExecSQL','Runlog',True);
       LogMessage('ValidateLogin: Result Assignment','Runlog',True);
       Result := ParamByName('@IsValid').AsString;
     on E:Exception do
       LogMessage('ValidateLogin: ' + E.Message,'Runlog',True);

David Keith

More information about the unixODBC-dev mailing list