Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

IBObjects · IB Objects support list

The Yahoo! Groups Product Blog

Check it out!

Group Information

  • Members: 2274
  • Category: Databases
  • Founded: Jan 14, 2000
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Messages

Advanced
Messages Help
Messages 46220 - 46249 of 46845   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#46220 From: Thomas Steinmaurer <ts@...>
Date: Fri Jun 15, 2012 4:50 am
Subject: Re: [IBO] Change pri key data type to auto increment
iblogmanager
Send Email Send Email
 
> I created my tables without specifying automatic numbering (incrementing) of
key fields (type integer). I now want to go back and fix that. Here is what I am
using in IB_SQL:
>
>      alter table units alter column kunit auto_number primary key
>
> IB does not like the data type. Literature refers to autonumber and
auto_increment. Those don't work either.

There is no auto-increment data type in InterBase/Firebird. This is done
differently in IB/FB, namely with a generator and a BEFORE INSERT
trigger. Look here for an example: http://www.firebirdfaq.org/faq29/

--
With regards,
Thomas Steinmaurer
http://www.upscene.com/

#46221 From: "jwcane2003" <jwcane@...>
Date: Mon Jun 18, 2012 4:44 pm
Subject: IB_SQL Export Dataset Syntax; Help File
jwcane2003
Send Email Send Email
 
Please point me to a sample syntax to export all data from a firebird database.
I'm assuming this is what is meant by "dataset".

Also Windows 7 appears to be unable to open the installed help file that comes
with IB_SQL v. 5.0.1.1. Please advise if there is a new version or other
solution.

#46222 From: Helen Borrie <helebor@...>
Date: Mon Jun 18, 2012 6:47 pm
Subject: Re: [IBO] IB_SQL Export Dataset Syntax; Help File
helebor
Send Email Send Email
 
At 04:44 AM 19/06/2012, jwcane2003 wrote:
>Please point me to a sample syntax to export all data from a firebird database.
I'm assuming this is what is meant by "dataset".
>
>Also Windows 7 appears to be unable to open the installed help file that comes
with IB_SQL v. 5.0.1.1. Please advise if there is a new version or other
solution.

http://www.microsoft.com/en-us/download/details.aspx?id=91

HB

#46223 From: "jwcane2003" <jwcane@...>
Date: Mon Jun 18, 2012 8:17 pm
Subject: Re: IB_SQL Export Dataset Syntax; Help File
jwcane2003
Send Email Send Email
 
Thanks. Opened IB_SQL panel "Export Dataset". Where can I get a sample command
or script to enter into that panel.

jwc



--- In IBObjects@yahoogroups.com, Helen Borrie <helebor@...> wrote:
>
> At 04:44 AM 19/06/2012, jwcane2003 wrote:
> >Please point me to a sample syntax to export all data from a firebird
database. I'm assuming this is what is meant by "dataset".
> >
> >Also Windows 7 appears to be unable to open the installed help file that
comes with IB_SQL v. 5.0.1.1. Please advise if there is a new version or other
solution.
>
> http://www.microsoft.com/en-us/download/details.aspx?id=91
>
> HB
>

#46224 From: "jwcane2003" <jwcane@...>
Date: Tue Jun 19, 2012 4:03 am
Subject: Re: IB_SQL Export Dataset Syntax; Help File
jwcane2003
Send Email Send Email
 
Succeeded in exporting data via "select all" query, and saving results to file.

Now need to understand how to restore the exported data from the same file, to a
new, empty version of the (altered) database.


--- In IBObjects@yahoogroups.com, "jwcane2003" <jwcane@...> wrote:
>
> Please point me to a sample syntax to export all data from a firebird
database. I'm assuming this is what is meant by "dataset".
>
> Also Windows 7 appears to be unable to open the installed help file that comes
with IB_SQL v. 5.0.1.1. Please advise if there is a new version or other
solution.
>

#46225 From: "mnrroux" <mnrroux@...>
Date: Fri Jun 22, 2012 6:33 am
Subject: How to get final SQL text executed when using ParamByName to set parameters
mnrroux
Send Email Send Email
 
Hi there,

How can I obtain the final SQL statement executed when setting SQL like below.

Eg.


   QDSQL.SQL.Add('Update Records');
   QDSQL.SQL.Add('Set FilePath = :FilePath');
...
   QDSQL.ParamByName('FilePath').AsString := 'Test';
   QDSQL.ExecSQL;

I want to get the follow SQL:
   Update Records Set FilePath = 'Test'

How can I obtain the final SQL executed? Thanks in advance for the assistance.

#46226 From: "Hans" <hhoogstraat@...>
Date: Fri Jun 22, 2012 4:50 pm
Subject: RE: [IBO] How to get final SQL text executed when using ParamByName to set parameters
ittybittypro...
Send Email Send Email
 
Some think like this may be an approach

procedure TFMain.BTFirebirdMonitorClick(Sender: TObject);
begin
    IB_MonitorDialog.ShowOnlyOne;
end;

-----Original Message-----
From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com] On Behalf
Of mnrroux
Sent: Friday, June 22, 2012 12:33 AM
To: ibobjects@yahoogroups.com
Subject: [IBO] How to get final SQL text executed when using ParamByName to
set parameters

Hi there,

How can I obtain the final SQL statement executed when setting SQL like
below.

Eg.


   QDSQL.SQL.Add('Update Records');
   QDSQL.SQL.Add('Set FilePath = :FilePath'); ...
   QDSQL.ParamByName('FilePath').AsString := 'Test';
   QDSQL.ExecSQL;

I want to get the follow SQL:
   Update Records Set FilePath = 'Test'

How can I obtain the final SQL executed? Thanks in advance for the
assistance.



------------------------------------

___________________________________________________________________________
IB Objects - direct, complete, custom connectivity to Firebird or InterBase
              without the need for BDE, ODBC or any other layer.
___________________________________________________________________________
http://www.ibobjects.com - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more !
Yahoo! Groups Links

#46227 From: "johngreco915" <jfgreco@...>
Date: Tue Jun 26, 2012 7:17 pm
Subject: Access Violation
johngreco915
Send Email Send Email
 
Running XE2 Update 4 on Windows 7 64 bit. Compiling a 32 bit application.

Everything compiles fine however, when the TIBODataBase goes to connect to the
database, I am getting an access violation. Everything was working fine under
D2007 on XP last week. This is a new upgrade to Win7 on my dev machine.

Error:

Project XXX.exe raised exception class $C0000005 with message 'access violation
at 0x5dad3621: write of address 0x0000004c'.

When I trace it out it is happening on line 16757 in IB_Components at
isc_attach_database.

Any help would be much appreciated.

#46228 From: Andrei Luís <compuvale.software@...>
Date: Wed Jun 27, 2012 9:21 pm
Subject: 1 row of data in 2 (or more) rows of a TIB_LookupCombo
andrei_luis
Send Email Send Email
 
Hello to all,

I'm managing a situation, where I need to bring three very width fields in
a IB_LookupCombo. I was wondering, if it is possible to show each row of
the source table in two or more rows of TIB_LookupCombo. Something like
this should be shown when IB_Lookupcombo is clicked:

|-------------------------------------------------------------------------------\
--------------|
| Reg_ID | Product
            |
| Ref
                 |
| Color
                 |
|-------------------------------------------------------------------------------\
--------------|
|   1       | Product 1
               |
| Ref X
                  |
| Black / White / Red / Green
       |
|-------------------------------------------------------------------------------\
--------------|
|   2       | Product 2
               |
| Ref Y
                  |
| Yellow / White / Red / Green
      |
|-------------------------------------------------------------------------------\
--------------|
|   3       | Product 3
               |
| Ref XY
                |
| Blue / White / Red / Green
       |
|-------------------------------------------------------------------------------\
--------------|


Any ideas?

[]s
Andrei


[Non-text portions of this message have been removed]

#46229 From: "jwcane2003" <jwcane@...>
Date: Thu Jun 28, 2012 12:23 am
Subject: Insert error
jwcane2003
Send Email Send Email
 
The following insert command is an example of what I would like to use to enter
dummy data into my database for testing:

INSERT INTO residents (First, Last, Bldg, Unit, cbRelease, Email, lbOwnRent)
VALUES("Theo","Jones","6105","2101","Yes","jones@...","Own")^

When I run it, IB_SQL returns the following:

ISC ERROR CODE:335544321

ISC ERROR MESSAGE:
arithmetic exception, numeric overflow, or string truncation
string right truncation

STATEMENT:
  IB_Script.<no name>(TIB_DSQL)

I induced a field name error in the last column and generated an appropriate
error. Hence I know that the truncation error applies to the VALUES(...) part of
the query.

Any ideas appreciated.

#46230 From: Michel LE CLEZIO <mlcvista@...>
Date: Thu Jun 28, 2012 7:34 am
Subject: Re: [IBO] Insert error
mlcvista
Send Email Send Email
 
Hello,
Do you have compare size of field and length of string you try to insert ?
If field's size is smaller than string, that could be the reason...
(All the field must be char or varchar...with a length)
 
Bye...
 
NB why you place ^ at the end ?
 


________________________________
  De : jwcane2003 <jwcane@...>
À : IBObjects@yahoogroups.com
Envoyé le : Jeudi 28 juin 2012 2h23
Objet : [IBO] Insert error



 

The following insert command is an example of what I would like to use to enter
dummy data into my database for testing:

INSERT INTO residents (First, Last, Bldg, Unit, cbRelease, Email, lbOwnRent)
VALUES("Theo","Jones","6105","2101","Yes","mailto:jones%40aol.com","Own")^

When I run it, IB_SQL returns the following:

ISC ERROR CODE:335544321

ISC ERROR MESSAGE:
arithmetic exception, numeric overflow, or string truncation
string right truncation

STATEMENT:
IB_Script.<no name>(TIB_DSQL)

I induced a field name error in the last column and generated an appropriate
error. Hence I know that the truncation error applies to the VALUES(...) part of
the query.

Any ideas appreciated.




[Non-text portions of this message have been removed]

#46231 From: "Mikey" <mlcvista@...>
Date: Thu Jun 28, 2012 9:42 am
Subject: Re: Insert error
mlcvista
Send Email Send Email
 
Hello,

Also see if you have the good charset for your database...(if you use a char in
the sql that is not supported by the charset...you will have such message). And
may be the % inside the sql is the cause of the message...

Bye.
Mikey

--- In IBObjects@yahoogroups.com, Michel LE CLEZIO <mlcvista@...> wrote:
>
> Hello,
> Do you have compare size of field and length of string you try to insert ?
> If field's size is smaller than string, that could be the reason...
> (All the field must be char or varchar...with a length)
>  
> Bye...
>  
> NB why you place ^ at the end ?
>  
>
>
> ________________________________
>  De : jwcane2003 <jwcane@...>
> À : IBObjects@yahoogroups.com
> Envoyé le : Jeudi 28 juin 2012 2h23
> Objet : [IBO] Insert error
>
>
>
>  
>
> The following insert command is an example of what I would like to use to
enter dummy data into my database for testing:
>
> INSERT INTO residents (First, Last, Bldg, Unit, cbRelease, Email, lbOwnRent)
> VALUES("Theo","Jones","6105","2101","Yes","mailto:jones%40aol.com","Own")^
>
> When I run it, IB_SQL returns the following:
>
> ISC ERROR CODE:335544321
>
> ISC ERROR MESSAGE:
> arithmetic exception, numeric overflow, or string truncation
> string right truncation
>
> STATEMENT:
> IB_Script.<no name>(TIB_DSQL)
>
> I induced a field name error in the last column and generated an appropriate
error. Hence I know that the truncation error applies to the VALUES(...) part of
the query.
>
> Any ideas appreciated.
>
>
>
>
> [Non-text portions of this message have been removed]
>

#46232 From: Michel LE CLEZIO <mlcvista@...>
Date: Thu Jun 28, 2012 9:46 am
Subject: Re: [IBO] Insert error
mlcvista
Send Email Send Email
 
Hello,
 
Do you take a look of the charset you use for this database...
If you place a char in the sql that is not supported by the charset, you could
have such message...
May be replacing % in the sql this could solve your problem.
 
Bye bye..


________________________________
  De : Michel LE CLEZIO <mlcvista@...>
À : "IBObjects@yahoogroups.com" <IBObjects@yahoogroups.com>
Envoyé le : Jeudi 28 juin 2012 9h34
Objet : Re: [IBO] Insert error



 

Hello,
Do you have compare size of field and length of string you try to insert ?
If field's size is smaller than string, that could be the reason...
(All the field must be char or varchar...with a length)
 
Bye...
 
NB why you place ^ at the end ?
 


________________________________
De : jwcane2003 <mailto:jwcane%40enw-ltd.com>
À : mailto:IBObjects%40yahoogroups.com
Envoyé le : Jeudi 28 juin 2012 2h23
Objet : [IBO] Insert error


 

The following insert command is an example of what I would like to use to enter
dummy data into my database for testing:

INSERT INTO residents (First, Last, Bldg, Unit, cbRelease, Email, lbOwnRent)
VALUES("Theo","Jones","6105","2101","Yes","mailto:jones%40aol.com","Own")^

When I run it, IB_SQL returns the following:

ISC ERROR CODE:335544321

ISC ERROR MESSAGE:
arithmetic exception, numeric overflow, or string truncation
string right truncation

STATEMENT:
IB_Script.<no name>(TIB_DSQL)

I induced a field name error in the last column and generated an appropriate
error. Hence I know that the truncation error applies to the VALUES(...) part of
the query.

Any ideas appreciated.

[Non-text portions of this message have been removed]




[Non-text portions of this message have been removed]

#46233 From: "welkspereira" <welkspereira@...>
Date: Fri Jun 29, 2012 11:15 am
Subject: Diference 4_9_14_Eval and IBO 4_9_14_b44 Performace ???
welkspereira
Send Email Send Email
 
I used Version IBO 4_9_14_Eval in my application, I bought the IBO and installed
the version IBO 4_9_14_b44.
After the instalation IBO 4_9_14_b44  my system performace low 70 %.

Is there any difference between these two versions ( IBO 4_9_14_Eval, IBO
4_9_14_b44) that can decrease the performace?

Welks

#46234 From: Camrad INode <camrad@...>
Date: Sat Jun 30, 2012 4:13 am
Subject: Cannot successfully purchase from the onlinr store.
pamalau
Send Email Send Email
 
Hi
Have been trying for the last two dats to purchase via the online store.
Just get empty invoices.
Have tried to contact via Skype, and the email on the web site with zero
response.
I have a purchse window that closes in 9 hours. After that the budget
gets reallocated.

Any Admin personnel monitoring this list?
Cheers

#46235 From: "IBO Support List" <supportlist@...>
Date: Sat Jun 30, 2012 10:06 am
Subject: RE: [IBO] Cannot successfully purchase from the onlinr store.
kylixguru
Send Email Send Email
 
I am still here if you need some help.
See me on Skype.

Jason

-----Original Message-----
From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com] On Behalf
Of Camrad INode
Sent: 29 June 2012 10:14 PM
To: IBObjects@yahoogroups.com
Subject: [IBO] Cannot successfully purchase from the onlinr store.

Hi
Have been trying for the last two dats to purchase via the online store.
Just get empty invoices.
Have tried to contact via Skype, and the email on the web site with zero
response.
I have a purchse window that closes in 9 hours. After that the budget
gets reallocated.

Any Admin personnel monitoring this list?
Cheers



------------------------------------

___________________________________________________________________________
IB Objects - direct, complete, custom connectivity to Firebird or InterBase
              without the need for BDE, ODBC or any other layer.
___________________________________________________________________________
http://www.ibobjects.com - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more !
Yahoo! Groups Links

#46236 From: "net2pw" <welchp@...>
Date: Sat Jun 30, 2012 4:11 pm
Subject: Re: Access Violation
net2pw
Send Email Send Email
 
Jason,

This is the very same problem that I reported a few months ago but occurs using
Intraweb. I'm glad it is reproduced in a non-Intraweb situation which will make
it easier to resolve. I use Vista 64bit. Hope you can figure it out soon since
it is a big problem. I've moved to dbExpress in the interim.

Pete

--- In IBObjects@yahoogroups.com, "johngreco915" <jfgreco@...> wrote:
>
> Running XE2 Update 4 on Windows 7 64 bit. Compiling a 32 bit application.
>
> Everything compiles fine however, when the TIBODataBase goes to connect to the
database, I am getting an access violation. Everything was working fine under
D2007 on XP last week. This is a new upgrade to Win7 on my dev machine.
>
> Error:
>
> Project XXX.exe raised exception class $C0000005 with message 'access
violation at 0x5dad3621: write of address 0x0000004c'.
>
> When I trace it out it is happening on line 16757 in IB_Components at
isc_attach_database.
>
> Any help would be much appreciated.
>

#46237 From: "Ed Dressel" <dressel@...>
Date: Tue Jul 3, 2012 5:53 pm
Subject: BLOB field translated incorrectly with varaints
eddressel
Send Email Send Email
 
XE2

I have a blob field in a table that is being translated incorrectly to a wide
string when I have a variant that holds the text data.

I have the following table:

   CREATE TABLE MyTable (
   ...
       MyBlob          DM_BLOB
   );

where DM_BLOB is defined as

   CREATE DOMAIN DM_BLOB AS
   BLOB SUB_TYPE 0 SEGMENT SIZE 80
   DEFAULT NULL;

In accessing the data through a TIBOQuery, the following code works just fine:

   Memo1.Lines.Text := FqryTable.FieldByName('MyBlob').AsString;

But the following does not work (where lvar is a variant):

   lvar := FqryTables.FieldByName('MyBlob').Value;
   Memo2.Lines.Text := lVar;

In my app I cannot get away from having the value of 'MyBlob' held by a variant.
Is there a way to get it translated correctly from a variant to a ANSI String?

Thanks
Ed Dressel

#46238 From: "Ed Dressel" <dressel@...>
Date: Tue Jul 3, 2012 6:34 pm
Subject: Re: BLOB field translated incorrectly with varaints
eddressel
Send Email Send Email
 
FTR, I reproduced this with a DB Express connection as well and will ask in the
EMBT ngs.

#46239 From: Svein Erling Tysvær <svein.erling.tysvaer@...>
Date: Wed Jul 4, 2012 7:50 am
Subject: RE: [IBO] BLOB field translated incorrectly with varaints
svein_erling
Send Email Send Email
 
>  CREATE DOMAIN DM_BLOB AS
>  BLOB SUB_TYPE 0 SEGMENT SIZE 80
>  DEFAULT NULL;

I though subtype 0 was binary, and that it was subtype 1 that was text?

> Memo1.Lines.Text := FqryTable.FieldByName('MyBlob').AsString;
>
>But the following does not work (where lvar is a variant):
>
>  lvar := FqryTables.FieldByName('MyBlob').Value;
>  Memo2.Lines.Text := lVar;

Maybe .AsString translates the binary blob to text, whereas lvar already is of a
different type?

Set

#46240 From: "Ed Dressel" <dressel@...>
Date: Thu Jul 5, 2012 3:45 pm
Subject: Re: [IBO] BLOB field translated incorrectly with varaints
eddressel
Send Email Send Email
 
> Maybe .AsString translates the binary blob to text, whereas lvar
> already is of a different type?


My intermediary is a Dev Ex grid which holds the string as a variant.  It's not
easy to replace.

Any ideas on how to get the variant back to an ansi string?

#46241 From: "jwcane2003" <jwcane@...>
Date: Thu Jul 5, 2012 4:51 pm
Subject: Compiler error - IBF_Base
jwcane2003
Send Email Send Email
 
Added the following to my project:
     dlgExport: TIB_ExportDialog;
     csvExport: TIB_Export;
     DataPump: TIB_DataPump;

Now the following compile-time error occurs:
[DCC Fatal Error] IB_TransactionSource.pas(227):
F2051 Unit IBF_Base was compiled with a different version of
IB_TransactionSource.TIB_TransactionSource

========

Rebuilding had no effect on this error.

Any ideas appreciated

#46242 From: Svein Erling Tysvær <svein.erling.tysvaer@...>
Date: Fri Jul 6, 2012 8:36 am
Subject: RE: [IBO] BLOB field translated incorrectly with varaints
svein_erling
Send Email Send Email
 
>> Maybe .AsString translates the binary blob to text, whereas lvar
>> already is of a different type?
>
>My intermediary is a Dev Ex grid which holds the string as a variant.  It's not
easy to replace.
>Any ideas on how to get the variant back to an ansi string?

Maybe you could change your query (or make a view) to contain cast(MyBlob as
varchar(<WhateverLengthYouPrefer>). Unfortunately, this will not work if your
blob contains non-text data or is huge.

HTH,
Set

#46243 From: "Dayna" <quathiaski@...>
Date: Sun Jul 8, 2012 4:09 am
Subject: IB_4_7 Blob issues. Reply required urgently. Customer opens again on monday.
quathiaski@...
Send Email Send Email
 
Hi there.  On a version 2.5.x firebird database.



My customers started getting a message 'BLOB NOT FOUND'.



So I gfixed the table and then did a backup/overwrite restore on it.



Now I'm getting a dozen messages about unable to activate index because :



gbak:cannot commit index FK_DIAGNOSISITEM_1

gbak: ERROR:violation of FOREIGN KEY constraint "FK_DIAGNOSISITEM_1" on
table "DIAGNOSISITEM"

gbak: ERROR:    Foreign key reference target does not exist



yet I can open both the table where the FK is defined and in the target
table I can open and view the data.



How can I fix this without losing data if possible.



Dayna.







[Non-text portions of this message have been removed]

#46244 From: "Dayna" <quathiaski@...>
Date: Sun Jul 8, 2012 4:35 am
Subject: RE: IB_4_7 Blob issues. Reply required urgently. Customer opens again on monday.
quathiaski@...
Send Email Send Email
 
Hah!  I figured it out.



       select * from appointment

         left join patient

           on (appointment.patientid = patient.patientid)

       where

         patient.patientid is null



showed me where an appointment existed by the patient did not.



I deleted the appointment row and committed.



I was then able to reactivate the fk.



Thanks if you replied while I was writing this.



Dayna.









From: Dayna [mailto:quathiaski@...]
Sent: Saturday, July 07, 2012 09:10 PM
To: 'IBObjects@yahoogroups.com'
Subject: IB_4_7 Blob issues. Reply required urgently. Customer opens again
on monday.



Hi there.  On a version 2.5.x firebird database.



My customers started getting a message 'BLOB NOT FOUND'.



So I gfixed the table and then did a backup/overwrite restore on it.



Now I'm getting a dozen messages about unable to activate index because :



gbak:cannot commit index FK_DIAGNOSISITEM_1

gbak: ERROR:violation of FOREIGN KEY constraint "FK_DIAGNOSISITEM_1" on
table "DIAGNOSISITEM"

gbak: ERROR:    Foreign key reference target does not exist



yet I can open both the table where the FK is defined and in the target
table I can open and view the data.



How can I fix this without losing data if possible.



Dayna.







[Non-text portions of this message have been removed]

#46245 From: "Enrico Cima" <enrico.cima1@...>
Date: Sun Jul 8, 2012 8:37 pm
Subject: BeforeDelete Event
enricocima
Send Email Send Email
 
Hi All,



I have the case that during a BeforeDelete Event into an IB_Query,  I check if
the record can be deleted or not.

If the record can't be delete for any project reason (maybe the record has some
other links to be deleted before), how I can cancel the operation at this step?





void __fastcall TTF_Art_Base::IB_Q_IMMBeforeDelete(TIB_Dataset *IB_Dataset)

{



//  ... check existence for example of movements of this Article in the DB

//  .  if movements existence, don't want to proceed here, is possible to skip
the delete here?



}





How I can do this?



Thanks!

Bye!




[Non-text portions of this message have been removed]

#46246 From: "Luiz" <cprmlao@...>
Date: Mon Jul 9, 2012 8:36 pm
Subject: RES: [IBO] BeforeDelete Event
lulili2000
Send Email Send Email
 
Hi,



Use Suysutils.Abort.



Luiz



De: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com] Em nome de
Enrico Cima
Enviada em: domingo, 8 de julho de 2012 17:38
Para: IBObjects@yahoogroups.com
Assunto: [IBO] BeforeDelete Event





Hi All,

I have the case that during a BeforeDelete Event into an IB_Query, I check
if the record can be deleted or not.

If the record can't be delete for any project reason (maybe the record has
some other links to be deleted before), how I can cancel the operation at
this step?

void __fastcall TTF_Art_Base::IB_Q_IMMBeforeDelete(TIB_Dataset *IB_Dataset)

{

// ... check existence for example of movements of this Article in the DB

// . if movements existence, don't want to proceed here, is possible to skip
the delete here?

}

How I can do this?

Thanks!

Bye!

[Non-text portions of this message have been removed]





[Non-text portions of this message have been removed]

#46247 From: "patrick_marten" <patrick_marten@...>
Date: Fri Jul 13, 2012 9:30 am
Subject: EAssertionFailed: Component already destroyed: IBO_DefaultSession
patrick_marten
Send Email Send Email
 
Hello,

since a while I'm getting an EAssertionFailed exception within my application.

The message:
"Component already destroyed: IBO_DefaultSession ClassName: TIB_Session
(C:\Builds\TP\rtl\common\Classes.pas, Row / Line 12219)"

I think this happens since one of the latest updates, but I'm not absolutely
sure.

I also wasn't able to figure out, which action exactly is causing this problem.
It happens more or less randomly on different actions: closing a form etc.

What could be the reason for this? It's very annoying right now...

I'm using DelphiXE, IBO 4.9.14 Build 50.

Kind regards,
Patrick

#46248 From: "patrick_marten" <patrick_marten@...>
Date: Fri Jul 13, 2012 9:40 am
Subject: EIB_DatasetError: Dataset to update not found
patrick_marten
Send Email Send Email
 
EIB_DatasetError: Dataset to update not found


Hello,

I have a routine where I'm going through several tables, look for certain
fields, change their content / value via a DB-aware control and post the
changes.

There is one table where this fails, although several tables before and
afterwards work fine.

With this table I'm getting an DatasetError with the message (translated)
"Dataset to update not found".

To make sure, that it isn't the DB-aware control, which is causing trouble, I've
tried <Field>.Value := <Field>.Value and the same error occurs when I try to
post the changes.

So basicaly it looks like this:

          IBOQuery1.Close;
          IBOQuery1.SQL.Clear;
          IBOQuery1.SQL.Add('select * from TABLE1');
          IBOQuery1.Open;
          if not (IBOQuery1.Bof and IBOQuery1.Eof) then begin
             IBOQuery1.First;
             while not IBOQuery1.Eof do begin
                try
                   for myCounter := 1 to 5 do begin
                      myCurrentFieldName := 'FIELD' + Format('%2.2d',
[myCounter]);

                      if not IBOQuery1.FieldByName(myCurrentFieldName).IsNull
then begin
								 // the next two rows are normaly not there as the DB-aware control takes
care of the changes
								 // the error occurs anyway...
								 IBOQuery1.Edit;
								 IBOQuery1.FieldByName(myCurrentFieldName).Value :=
IBOQuery1.FieldByName(myCurrentFieldName).Value;

								 if IBOQuery1.State in [dsEdit, dsInsert] then begin
                            IBOQuery1.Post;
                         end;
                      end;
                   end;
                except

                end;

                IBOQuery1.Next;
             end;
			 end;


I repeat this block for several tables and as I said: it works for all but one
somewhere in the middle... The fields I'm updating do exist in other tables as
well, i.e. the same datatype etc. (BLOB SUB_TYPE 0).

The dataset is open and in edit mode. The ID of the dataset is correct as well.
Fields to edit do exist and assigning of the value works. The check if
field.IsNull works too, but post and later commit cause the error.

What could be wrong here?

DelphiXE, IBO 4.9.14 Build 50

Regards,
Patrick

#46249 From: "patrick_marten" <patrick_marten@...>
Date: Sun Jul 15, 2012 12:14 pm
Subject: Re: EIB_DatasetError: Dataset to update not found
patrick_marten
Send Email Send Email
 
The only way seems to be the usage of another query and an update statement...
The same block as in the first message, but with this change in the middle:

								 if <current table is the table with error> then begin
									 IBOQuery2.Close;
									 IBOQuery2.SQL.Clear;
									 IBOQuery2.SQL.Add('update <table with error> set myCurrentFieldName =
:myCurrentFieldName');
									
IBOQuery2.ParamByName(myCurrentFieldName).LoadFromFile(<blob_content_file>,
ftBlob);
									 IBOQuery2.ExecSQL;
								 end
								 else begin
									 IBOQuery1.Edit;
									 IBOQuery1.FieldByName(myCurrentFieldName).Value :=
IBOQuery1.FieldByName(myCurrentFieldName).Value;

									 if IBOQuery1.State in [dsEdit, dsInsert] then begin
										 IBOQuery1.Post;
									 end;
								 end;

This works apparently, but the error with the other way doesn't cause a good
feeling, so a fix would still be good.

Regards,
Patrick


--- In IBObjects@yahoogroups.com, "patrick_marten" <patrick_marten@...> wrote:
>
> EIB_DatasetError: Dataset to update not found
>
>
> Hello,
>
> I have a routine where I'm going through several tables, look for certain
fields, change their content / value via a DB-aware control and post the
changes.
>
> There is one table where this fails, although several tables before and
afterwards work fine.
>
> With this table I'm getting an DatasetError with the message (translated)
"Dataset to update not found".
>
> To make sure, that it isn't the DB-aware control, which is causing trouble,
I've tried <Field>.Value := <Field>.Value and the same error occurs when I try
to post the changes.
>
> So basicaly it looks like this:
>
>          IBOQuery1.Close;
>          IBOQuery1.SQL.Clear;
>          IBOQuery1.SQL.Add('select * from TABLE1');
>          IBOQuery1.Open;
>          if not (IBOQuery1.Bof and IBOQuery1.Eof) then begin
>             IBOQuery1.First;
>             while not IBOQuery1.Eof do begin
>                try
>                   for myCounter := 1 to 5 do begin
>                      myCurrentFieldName := 'FIELD' + Format('%2.2d',
[myCounter]);
>
>                      if not IBOQuery1.FieldByName(myCurrentFieldName).IsNull
then begin
> 							 // the next two rows are normaly not there as the DB-aware control
takes care of the changes
> 							 // the error occurs anyway...
> 							 IBOQuery1.Edit;
> 							 IBOQuery1.FieldByName(myCurrentFieldName).Value :=
IBOQuery1.FieldByName(myCurrentFieldName).Value;
>
> 							 if IBOQuery1.State in [dsEdit, dsInsert] then begin
>                            IBOQuery1.Post;
>                         end;
>                      end;
>                   end;
>                except
>
>                end;
>
>                IBOQuery1.Next;
>             end;
> 		 end;
>
>
> I repeat this block for several tables and as I said: it works for all but one
somewhere in the middle... The fields I'm updating do exist in other tables as
well, i.e. the same datatype etc. (BLOB SUB_TYPE 0).
>
> The dataset is open and in edit mode. The ID of the dataset is correct as
well. Fields to edit do exist and assigning of the value works. The check if
field.IsNull works too, but post and later commit cause the error.
>
> What could be wrong here?
>
> DelphiXE, IBO 4.9.14 Build 50
>
> Regards,
> Patrick
>

Messages 46220 - 46249 of 46845   Oldest  |  < Older  |  Newer >  |  Newest
Add to My Yahoo!      XML What's This?

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help