Subject | Re: [IBO] Blob problems (IBO and FB 1.5 RC8 -RC9 possible bug) |
---|---|
Author | mp527 |
Post date | 2004-02-18T15:05:39Z |
Helen,
If you have a sec, maybe you can check this out also:
it's the constructor to the client thread where the DB objects are
created for the users session:
Maybe you can see something I don't.
Again, I am currently using a tib_cursor to handle everything.
(everything is cleaned up in the destructor)
Thanks for your help :-) Can't wait for your book.
Constructor Tclientthread.Create
(hsock:integer;db_name,db_username,db_password:shortstring;sessionmgr
:tam_session;logthechat,usepool:boolean);
begin
sock:=TTCPBlockSocket.create;
shutingdown:=false;
Sock.socket:=hSock;
write_cs:= TCriticalSection.Create;
bcastq:= tstringlist.create;
fsessionmgr:= sessionmgr;
flogthechat:=logthechat;
fusepool:= usepool;
sock.GetSins;
FreeOnTerminate:=true;
//create database objects
admindbpath:=db_name;
db_session := TIB_Session.Create(nil);
db_connection := TIB_Connection.Create(nil);
db_connection.CacheStatementHandles:=false;
db_connection.SQLDialect:=3;
db_connection.Protocol:=cpTCP_IP;
db_connection.PageSize:=4096;
db_connection.KeepConnection:=true;
db_session.DefaultConnection := db_connection;
main_trans := TIB_Transaction.Create
(nil);
main_trans.IB_Connection := db_connection;
db_connection.DefaultTransaction := main_trans;
db_query_trans := TIB_Transaction.create
(nil);
db_query_trans.Isolation := tiCommitted;
db_query_trans.IB_Connection := db_connection;
db_query := TIB_Cursor.Create(nil);
db_query.IB_Connection := db_connection;
db_query.IB_Transaction := db_query_trans;
db_query.IB_Session := db_session;
//set databasename
db_connection.DatabaseName:= sock.GetLocalSinIP+':'+db_name;
db_connection.Username:= db_username;
db_connection.Password:= db_password;
db_connection.KeepConnection:=true;
inherited create(false);
end;
If you have a sec, maybe you can check this out also:
it's the constructor to the client thread where the DB objects are
created for the users session:
Maybe you can see something I don't.
Again, I am currently using a tib_cursor to handle everything.
(everything is cleaned up in the destructor)
Thanks for your help :-) Can't wait for your book.
Constructor Tclientthread.Create
(hsock:integer;db_name,db_username,db_password:shortstring;sessionmgr
:tam_session;logthechat,usepool:boolean);
begin
sock:=TTCPBlockSocket.create;
shutingdown:=false;
Sock.socket:=hSock;
write_cs:= TCriticalSection.Create;
bcastq:= tstringlist.create;
fsessionmgr:= sessionmgr;
flogthechat:=logthechat;
fusepool:= usepool;
sock.GetSins;
FreeOnTerminate:=true;
//create database objects
admindbpath:=db_name;
db_session := TIB_Session.Create(nil);
db_connection := TIB_Connection.Create(nil);
db_connection.CacheStatementHandles:=false;
db_connection.SQLDialect:=3;
db_connection.Protocol:=cpTCP_IP;
db_connection.PageSize:=4096;
db_connection.KeepConnection:=true;
db_session.DefaultConnection := db_connection;
main_trans := TIB_Transaction.Create
(nil);
main_trans.IB_Connection := db_connection;
db_connection.DefaultTransaction := main_trans;
db_query_trans := TIB_Transaction.create
(nil);
db_query_trans.Isolation := tiCommitted;
db_query_trans.IB_Connection := db_connection;
db_query := TIB_Cursor.Create(nil);
db_query.IB_Connection := db_connection;
db_query.IB_Transaction := db_query_trans;
db_query.IB_Session := db_session;
//set databasename
db_connection.DatabaseName:= sock.GetLocalSinIP+':'+db_name;
db_connection.Username:= db_username;
db_connection.Password:= db_password;
db_connection.KeepConnection:=true;
inherited create(false);
end;