Search found 35 matches

by Tsagoth
Sat 24 Oct 2020 03:19
Forum: InterBase Data Access Components
Topic: TIBCTAble read-only error
Replies: 2
Views: 2715

Re: TIBCTAble read-only error

Problem solved. Through trial and error, determined it was the Unidirectional = True, and then reading the help file, it does say that setting Unidirectional = True makes the dataset read-only.
by Tsagoth
Fri 23 Oct 2020 04:04
Forum: InterBase Data Access Components
Topic: TIBCTAble read-only error
Replies: 2
Views: 2715

TIBCTAble read-only error

When I issue the statement IBCTable1.Append I get an exception "cannot modify a read-only dataset". Not seeing why the table is being treated as read-only

[code] IBCConnection1 := TIBCConnection.Create(nil);
IBCTransaction1 := TIBCTransaction.Create(nil);
IBCQuery1 := TIBCQuery.Create(nil);
IBCTable1 := TIBCTable.Create(nil);

IBCConnection1.Server := gIBServer;
IBCConnection1.DefaultTransaction := IBCTransaction1;
IBCConnection1.Username := 'SYSDBA';
IBCConnection1.Password := 'masterkey';
IBCConnection1.Database := 'C:\IBDATA\MAILER.IB';
IBCConnection1.AutoCommit := True;

IBCTransaction1.DefaultConnection := IBCConnection1;
IBCTransaction1.IsolationLevel := iblCustom;
IBCTransaction1.Params.Add('read');
IBCTransaction1.Params.Add('write');
IBCTransaction1.Params.Add('wait');
IBCTransaction1.Params.Add('concurrency');

IBCQuery1.Connection := IBCConnection1;
IBCQuery1.AutoCommit := True;
IBCQuery1.UniDirectional := True;
IBCQuery1.Transaction := IBCTransaction1;

IBCTable1.Connection := IBCConnection1;
IBCTable1.KeyGenerator := 'IDXGEN';
IBCTable1.ReadOnly := False;
IBCTable1.Transaction := IBCTransaction1;
IBCTable1.UniDirectional := True;
IBCTable1.TableName := 'MAIL';
IBCTable1.UpdateTransaction := IBCTransaction1;
IBCTable1.AutoCommit := True;

IBCConnection1.Connected := True;
IBCTable1.Active := True;
[/code]
by Tsagoth
Wed 08 Jul 2020 13:13
Forum: InterBase Data Access Components
Topic: AutoCommit not working
Replies: 5
Views: 6786

Re: AutoCommit not working

I'm afraid that's impossible, I can't send you my Interbase installation. If you guys lack the skill to read your own code in .Prepare to see why it's creating and then trying to modify an active transaction, then there really is no chance you'll be able to fix it.

Thanks anyway.
by Tsagoth
Tue 07 Jul 2020 15:14
Forum: InterBase Data Access Components
Topic: AutoCommit not working
Replies: 5
Views: 6786

Re: AutoCommit not working

As a workaround to AutoCommit being broken, I changed the Execut above to :

zdbu.IBCTransaction1.StartTransaction;
zdbu.IBCQuery1.Execute;
zdbu.IBCTransaction1.Commit;

and this works. However, I ran into yet another bug with IBDAC:

zdbu.IBCTransaction1.StartTransaction;
zdbu.IBCQuery1.Execute;
zdbu.IBCTransaction1.Commit;

zdbu.IBCQuery1.Close;
zdbu.IBCQuery1.SQL.Clear;
zdbu.IBCQuery1.SQL.Add('INSERT INTO DEVAPP(IDXNO,DEVID,UPDSTATUS,UPDPKGID,VERSION,FILEVERSION,FILEDATE,ISBANNED,ISACTIVE,APPDATE,APPID) ');
zdbu.IBCQuery1.SQL.Add('VALUES(GEN_ID(IDXGEN,1),:DEVID,:UPDSTATUS,:UPDPKGID,:VERSION,:FILEVERSION,:FILEDATE,:ISBANNED,:ISACTIVE,:APPDATE,:APPID);');

zdbu.IBCQuery1.Prepare;

>> Exception: "can not perform operation on an active transaction"

What gives ? The previous transaction was committed, the query was closed. Why is Prepare starting a transaction ?
by Tsagoth
Sat 04 Jul 2020 02:44
Forum: InterBase Data Access Components
Topic: AutoCommit not working
Replies: 5
Views: 6786

AutoCommit not working

So I have the following in a multithreaded application. Each thread has it's own connection, query and transaction:

zuser.IBCTransaction1.DefaultConnection := zuser.IBCConnection1;
zuser.IBCTransaction1.IsolationLevel := iblCustom;
zuser.IBCTransaction1.Params.Add('read');
zuser.IBCTransaction1.Params.Add('write');
zuser.IBCTransaction1.Params.Add('wait');
zuser.IBCTransaction1.Params.Add('concurrency');

and then I try to perform:

zdbu.IBCQuery1.Close;
zdbu.IBCQuery1.SQL.Clear;
zdbu.IBCQuery1.SQL.Add('UPDATE DEVICE SET LCALLDATE = :LCALLDATE ');
zdbu.IBCQuery1.SQL.Add('WHERE DEVID = :DEVID;');

zdbu.IBCQuery1.ParamByName('LCALLDATE').AsDateTime := Now;
zdbu.IBCQuery1.ParamByName('DEVID').AsString := string(zdev.deviceid);

zdbu.IBCQuery1.Execute;
zdbu.IBCQuery1.Close;


There are three threads. Each thread executes the update about two seconds after the last thread, so there is ample time for the commit to occur. Threads 1 and 2 execute fine. Thread 3 gets an exception "deadlock update conflicts with concurrent update'.

Why is this ? Why is IBDAC not committing the transaction when I close the TIBCQuery ? If I add a line after the update saying "COMMIT;" then I get an error saying COMMIT not a valid keyword. There would be no conflict if IBDAC was actually doing a commit, so I have to think IBDAC is broken.
by Tsagoth
Wed 01 Jul 2020 19:43
Forum: InterBase Data Access Components
Topic: TPB constant error
Replies: 3
Views: 3671

Re: TPB constant error

That isn't true though. Setting iblSnapshot sets the NOWAIT option. I want to use WAIT so I must use iblCustom, which is fine. The interbase Language Reference specifies that SNAPSHOT is the valid IsolationLevel parameter to use. IBDAC dos not allow that keyword. That API guide is for use with C++, but I am using Delphi. I would expect IBDAC to use what the Language Reference says are the valid keywords.
by Tsagoth
Wed 10 Jun 2020 21:18
Forum: InterBase Data Access Components
Topic: When IBDAC 7.25 ?
Replies: 1
Views: 3238

When IBDAC 7.25 ?

New versions of UniDAC and ODAC are out, but I can't install them until IBDAC 7.25 is released. Any idea when that will be ?
by Tsagoth
Tue 09 Jun 2020 20:44
Forum: InterBase Data Access Components
Topic: TPB constant error
Replies: 3
Views: 3671

TPB constant error

IBCTransaction in the parameter strings does not accept snapshot. In fact it doesn't accept hardly any pf the Interbase options, read, write and wait are all it takes. Devart has used custom names like concurrency or read_comitted. Why don't you guys use the real names ? What do concurrency or consistency even mean, it's not documented anywhere what parms are valid in the Params stringlist.
by Tsagoth
Mon 08 Jun 2020 23:04
Forum: InterBase Data Access Components
Topic: Exception oddity with IBSCRIPT
Replies: 1
Views: 3208

Exception oddity with IBSCRIPT

I'm using Delphi 10.3.2 with IBDAC 7.2 on Win 7. I execute the following to create some Interbase tables:

procedure TForm5.Button4Click(Sender: TObject);
begin
try
CodeSite.Send('Deleting All Gymlete Tables');
DropTables.Execute;
except
on E: Exception do
begin
CodeSite.Send('eXCEPTION DETECTED');
CodeSite.SendException(E);
CodeSite.SendError(Format('Drop Tables failed: %s',[E.Message]));
ExceptionManager.StandardEurekaNotify(ExceptObject, ExceptAddr);
end;
end;

The first Codesite message gets sent. The IBScript component throws an exception for "metadata error - table not found" when some of the tables don't exist, which is fine. The problem is that my on E: Exception is not getting control. None of the Codesite error messages in the except block are issued.

So then I tried disabling Eurekalog altogether, and now I get a MS-style dialog box about the metadata error. So I'm guessing that the IBScript component is itself trapping the exception. Is that correct ? If that is true, how do I get it to stop doing that because I want to handle any exceptions myself.
by Tsagoth
Mon 13 Apr 2020 03:21
Forum: InterBase Data Access Components
Topic: Transaction trouble
Replies: 1
Views: 2119

Transaction trouble

I must be doing something wrong, getting SQL error:


cncMail := TIBCConnection.Create(nil);

cncMail.Server := gIBServer;
--- server stuff here ---

trnMail := TIBCTransaction.Create(nil);
trnMail.DefaultConnection := cncMail;
trnMail.Params.Clear;
trnMail.Params.Add('WRITE');
trnMail.Params.Add('WAIT');
trnMail.Params.Add('READ_COMMITTED');

qryMail := TIBCQuery.Create(nil);
qryMail.Connection := cncMail;
qryMail.LockMode := lmLockImmediate;
qryMail.Transaction := trnMail;

cncMail.Connect;

then later when I have 3 threads running and they are all trying to do like this:

Executing query <UPDATE EMAIL SET LOCKID = '00000003' WHERE LOCKID = '00000000' AND SENT = FALSE ROWS 1>
MailTask: SQL Error: lock conflict on no wait transaction

why is it saying nowait ? I said WAIT in the params. What am I doing wrong ? Also, "READ COMMITTED" is flagged as error, but that is what Interbase API says, you're using different terms.
by Tsagoth
Thu 21 Nov 2019 23:32
Forum: InterBase Data Access Components
Topic: Accessing SQLINSERT etc.
Replies: 2
Views: 2305

Accessing SQLINSERT etc.

When you add SQL statements to the SQLINSERT, SQLUPDATE etc. properties, if you used parameters, then how do you access them to set the values, as in how do you specify a ParamByName for those options and not the .SQL property ? Or prepare them, because the Prepare method works against the .SQL stringlist, not the others.
by Tsagoth
Tue 30 Apr 2019 01:35
Forum: InterBase Data Access Components
Topic: Two firebird servers, one works other not.
Replies: 11
Views: 17502

Re: Two firebird servers, one works other not.

Actively refused points to a port error. Either firewall is blocking or port 3050 is not actually the listener port.
by Tsagoth
Tue 29 Oct 2013 00:51
Forum: InterBase Data Access Components
Topic: Interbase 6
Replies: 7
Views: 1752

Re: Interbase 6

I see. Thanks for the explanation.
by Tsagoth
Sun 27 Oct 2013 02:39
Forum: InterBase Data Access Components
Topic: Interbase 6
Replies: 7
Views: 1752

Re: Interbase 6

Your answer of "You cannot work with InterBase 6 on the iOS platform because InterBase supports iOS starting from InterBase XE3 ToGo." makes no sense. He didn't ask you if he could use Interbase on a mobile device.

The question was "Would it be possible to connect to a remote Interbase 6 server with an iOS using IBDac?". Is it possible to use IBDAC to connect to a remote IB 6 server. I don't see why the answer would not be yes, but who knows. Unless IBDAC itself does not work on either iOS or Android, but the product page says it does.
by Tsagoth
Thu 11 Apr 2013 15:43
Forum: Universal Data Access Components
Topic: TUniTable or TUniQuery ?
Replies: 1
Views: 1086

TUniTable or TUniQuery ?

Does TUniTable work with the underlying table directly or does it just convert each operation into SQL statements such that I would be better off just using TUniQuery directly ?

I ask because often the examples given here show an SQL statement for the SELECT and then instead of using an Update will be shown a .Edit, fieldbyname = someval, .post operation. It makes me wonder if the table methods are a little faster than using SQL statements. But if TUniTable just calls TUniQuery under the covers then no reason to use it for that.