[firebird-support] Reminder: Jaybird survey

2012-09-22 Thread Mark Rotteveel
The Jaybird survey will be open until next Friday (28th of September). 
Please take the time to participate in our survey if you haven't already.

You can find the survey at http://infopoll.net/live/surveys/s36021.htm

Mark

On 17-9-2012 20:16, Mark Rotteveel wrote:> The Jaybird team would like 
to invite developers and users of Jaybird to
 > fill out a survey on your use of Jaybird (Firebird JDBC driver). You can
 > find the survey at http://infopoll.net/live/surveys/s36021.htm.
 >
 > The results of the survey will be used to decide where to focus
 > development of the upcoming Jaybird versions.
 >
 > Mark

-- 
Mark Rotteveel




++

Visit http://www.firebirdsql.org and click the Resources item
on the main (top) menu.  Try Knowledgebase and FAQ links !

Also search the knowledgebases at http://www.ibphoenix.com 

++
Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/



Re: [firebird-support] How to make queries to a temporary result set

2012-09-22 Thread Mercea Paul
On 2012.09.21 10:12 PM, HECTOR RIOS wrote:
>
> Hi,
> I´m trying to save some sql parsing in a Delphi application by using 
> temporary result sets. Is there such thing in Firebird?
> For example: some user makes a query with some filters and then wants 
> to make another query over results from previous query.
> It would be easy if added the filters over the result set without 
> having to mix previous filters plus last query´s filters.
> Anybody has an easy alternative for this?
>
You can run the query with the new filter or if you have a dataset 
populated from first query you can filter data from dataset with filter 
condition without interrogating again the server, this is from UI controls.
I don't know equivalent in Delphi but from c# i can do:

private void tbFilter_KeyUp(object sender, KeyEventArgs e)
 {
 if (tbFilter.Text.Length > 0)
 {
 bsProducts.Filter = "PRODUCTNAME LIKE '%"+ 
tbFilter.Text+"%'";
 }
 else
 {
 bsProducts.Filter = "";
 }
 }
bsProducts is populated running the main query.

HTH,
Paul MERCEA



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



Re: [firebird-support] How to make queries to a temporary result set

2012-09-22 Thread Doug Chamberlin
On 9/21/12 3:12 PM, HECTOR RIOS wrote:
> I´m trying to save some sql parsing in a Delphi application by using 
> temporary result sets. Is there such thing in Firebird?
> For example: some user makes a query with some filters and then wants to make 
> another query over results from previous query.
> It would be easy if added the filters over the result set without having to 
> mix previous filters plus last query´s filters.
> Anybody has an easy alternative for this?
Sounds like you need to use global temporary tables. These can have a
lifetime of the connection to the database which sounds like what would
be appropriate.

See http://www.firebirdsql.org/refdocs/langrefupd21-ddl-table.html

Doug C.



[firebird-support] Is there a CHARACTERDIFF() function in Firebird?

2012-09-22 Thread red_october2009
I'm building an application that includes a BLOB SUB_TYPE 1 (Memo) field to 
store free text.  The Memo field will typically store 4800 characters, and 
several users may make changes to the 4800 characters.  I want to keep a log of 
ONLY the CHANGES made to the 4800 characters.  I don't want to keep full copies 
of the OLD. and NEW. versions of the entire 4800 character field each time a 
change is made, because that's a big waste of storage space, and it's difficult 
for a human to read through both copies to see the differences.

It would be very cool if Firebird had a CHARACTERDIFF() function that would 
take the following parameters:

CHARACTERDIFF
  (
  ORIGINAL BLOB SUB_TYPE 1,   (Example: OLD.FIELDNAME)
  CHANGED BLOB SUB_TYPE 1 (Example: NEW.FIELDNAME)
  INCLUDE_POSITION_INFO CHAR(1)   (Example: Y or N)
  )
RETURNS
  (
  BLOB SUB_TYPE 1
  );

The output would be formatted like:

(If Position info = 'N')

Added:  "however there", "cannot undergo", "2012-Sep-21"
Changed: "Sumday"/"Sunday", "unadle"/"unable"
Deleted:  "a-hole"

(If Position info = 'Y')

Added:  28 "however there", 512 "cannot undergo", 4032 "2012-Sep-21"
Changed: 16 "Sumday"/"Sunday", 4710 "unadle"/"unable"
Deleted:  2371 "a-hole"
-

Combined with the CURRENT_USER, I could make a nice neat little log, that would 
be easy to read and use storage efficiently.

Does Firebird have something like this?  If not, does anyone have a Stored 
Procedure that can do this?

Thanks in advance.




[firebird-support] Re: How to capture a POST_EVENT in a client application?

2012-09-22 Thread realoldgeek2008
Hello Walter:

For VFP apps, I've used AtvSoftware's Visual FoxPro library Fb_post_event.fll, 
at http://www.atvsoftware.com/products.php?id=vfpfl.  For other languages, 
their Database Event Alerter For Firebird looks promising.

Jonathan

--- In firebird-support@yahoogroups.com, W O  
wrote:
>
> Hello everybody
> 
> How to capture an event in an application programmed with Visual Basic 6,
> Visual FoxPro, C, C++ or Java but without using components?
> 
> I know that there are Delphi's components for that but ... how can I
> capture an event in some of the above languages without using a component?
> 
> Greetings and thanks in advance.
> 
> Walter.
> 
> 
> [Non-text portions of this message have been removed]
>




Re: [firebird-support] Re: How to capture a POST_EVENT in a client application?

2012-09-22 Thread W O
Excellent Jonathan!!!

Seems very good, I'll give it a try.

Greetings.

Walter.




On Sat, Sep 22, 2012 at 10:51 AM, realoldgeek2008 <
jonathan.fi...@rocketmail.com> wrote:

> **
>
>
> Hello Walter:
>
> For VFP apps, I've used AtvSoftware's Visual FoxPro library
> Fb_post_event.fll, at http://www.atvsoftware.com/products.php?id=vfpfl.For 
> other languages, their Database Event Alerter For Firebird looks
> promising.
>
> Jonathan
>
>
> --- In firebird-support@yahoogroups.com, W O 
> wrote:
> >
> > Hello everybody
> >
> > How to capture an event in an application programmed with Visual Basic 6,
> > Visual FoxPro, C, C++ or Java but without using components?
> >
> > I know that there are Delphi's components for that but ... how can I
> > capture an event in some of the above languages without using a
> component?
> >
> > Greetings and thanks in advance.
> >
> > Walter.
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
>  
>


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





++

Visit http://www.firebirdsql.org and click the Resources item
on the main (top) menu.  Try Knowledgebase and FAQ links !

Also search the knowledgebases at http://www.ibphoenix.com 

++
Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/



Re: [firebird-support] How to make queries to a temporary result set

2012-09-22 Thread HECTOR RIOS
Hi Mercea,
Currently, I´m using Developer Express grid control and can do as you suggest, 
but I´m more interested to know if Firebird supports the temporary result set.
Regards,
Hector Rios
 


 From: Mercea Paul 
To: firebird-support@yahoogroups.com 
Sent: Saturday, September 22, 2012 3:48 AM
Subject: Re: [firebird-support] How to make queries to a temporary result set
  

 
   
 
On 2012.09.21 10:12 PM, HECTOR RIOS wrote:
>
> Hi,
> I´m trying to save some sql parsing in a Delphi application by using 
> temporary result sets. Is there such thing in Firebird?
> For example: some user makes a query with some filters and then wants 
> to make another query over results from previous query.
> It would be easy if added the filters over the result set without 
> having to mix previous filters plus last query´s filters.
> Anybody has an easy alternative for this?
>
You can run the query with the new filter or if you have a dataset 
populated from first query you can filter data from dataset with filter 
condition without interrogating again the server, this is from UI controls.
I don't know equivalent in Delphi but from c# i can do:

private void tbFilter_KeyUp(object sender, KeyEventArgs e)
{
if (tbFilter.Text.Length > 0)
{
bsProducts.Filter = "PRODUCTNAME LIKE '%"+ 
tbFilter.Text+"%'";
}
else
{
bsProducts.Filter = "";
}
}
bsProducts is populated running the main query.

HTH,
Paul MERCEA

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

   
  

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



Re: RES: [firebird-support] How to make queries to a temporary result set

2012-09-22 Thread HECTOR RIOS
Hi Andrea,
 
But would you have to create the table?
Regards,
 
Hector Rios
 


 From: Andrea Raimondi 
To: firebird-support@yahoogroups.com 
Sent: Saturday, September 22, 2012 12:06 AM
Subject: Re: RES: [firebird-support] How to make queries to a temporary result 
set
  

 
   
 
I am not 100% sure about this, but I think Firebird supports temporary
tables. You might try with that...
On Sep 22, 2012 1:41 AM, "HECTOR RIOS"  wrote:
>
> Hi Fabiano,
>
> I was thinking more like this:
>
> 1. User wants bills from client x and program makes a
>
> select * from clients where name= x
>
> 2. Program displays x bills in some grid.
>
> 3. Later on, user wants x bills from march and I would like to make a
query in program like this
>
> select * from lastResultSet where moth(bill_date) = 'march'
>
> of course, in this particular example, I could have made a query like
>
> select * from clients where name= x and month(bill_date)= 'march'
>
> but sometimes the second query is not added so easily, you would have to
make some parsing to mix both queries.
> It would be a lot easier if there were some temporary result set and
apply filters to this temporary.
>
> Regards,
>
> Hector Rios
>
>
> 
>  From: Fabiano 
> To: mailto:firebird-support%40yahoogroups.com
> Sent: Friday, September 21, 2012 1:26 PM
> Subject: RES: [firebird-support] How to make queries to a temporary
result set
>
>
>
>
>
> Maybe:
>
> Select * from
>
> (
>
> select * from table where field1 = 1
>
> ) as FILTER
>
> Where FILTER.field2 = 2
>
> Fabiano.
>
> [Non-text portions of this message have been removed]
>
>
>
>
> [Non-text portions of this message have been removed]
>
>
>
> 
>
> ++
>
> Visit http://www.firebirdsql.org/ and click the Resources item
> on the main (top) menu.  Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com/
>
> ++
> Yahoo! Groups Links
>
>
>

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

   
  

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



Re: [firebird-support] How to make queries to a temporary result set

2012-09-22 Thread HECTOR RIOS
Hi Doug,
 
With temporary tables would have to create them when I make the first query, 
right?
I´m looking for something simpler.
I know this feature of temporary result set is implemented on other database 
servers -I think Db2- and would like to know if firebird does support it but 
seems like not...
 
Regards,
Hector Rios
 


 From: Doug Chamberlin 
To: firebird-support@yahoogroups.com 
Sent: Saturday, September 22, 2012 7:28 AM
Subject: Re: [firebird-support] How to make queries to a temporary result set
  

 
   
 
On 9/21/12 3:12 PM, HECTOR RIOS wrote:
> I´m trying to save some sql parsing in a Delphi application by using 
> temporary result sets. Is there such thing in Firebird?
> For example: some user makes a query with some filters and then wants to make 
> another query over results from previous query.
> It would be easy if added the filters over the result set without having to 
> mix previous filters plus last query´s filters.
> Anybody has an easy alternative for this?
Sounds like you need to use global temporary tables. These can have a
lifetime of the connection to the database which sounds like what would
be appropriate.

See http://www.firebirdsql.org/refdocs/langrefupd21-ddl-table.html

Doug C.

   
  

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



Re: [firebird-support] Periodic database slowdown - troubleshooting steps?

2012-09-22 Thread Ann Harrison
On Tue, Sep 18, 2012 at 2:57 PM, Thomas Steinmaurer 
wrote:

>
> If you intend to run a sweep on the source database after a backup, you
> don't need to garbage collect in the source database during a backup,
> thus using gbak -g is fine.


On the other hand, the time spent garbage collecting during the backup
reduces
the time the sweep takes, so the net diffference is probably not measurable.

Cheers,

Ann

>


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



Re: RES: [firebird-support] How to make queries to a temporary result set

2012-09-22 Thread HECTOR RIOS
Hi,
Seems like temporary result set does not exist or at least nobody seems heard 
about it.
On second thought, I think Fabiano´s suggestion is workable for me because in 
the application, previous query could be saved (the one inside parentheses) and 
then add the outer select -subsequent query-. This solution would not require 
parsing.
Also, I found something about CTE and derived queries in firebird documentation 
that I have to check.
 
Thanks,
 
Hector Rios
 


 From: Andrea Raimondi 
To: firebird-support@yahoogroups.com 
Sent: Saturday, September 22, 2012 12:06 AM
Subject: Re: RES: [firebird-support] How to make queries to a temporary result 
set
  

 
   
 
I am not 100% sure about this, but I think Firebird supports temporary
tables. You might try with that...
On Sep 22, 2012 1:41 AM, "HECTOR RIOS"  wrote:
>
> Hi Fabiano,
>
> I was thinking more like this:
>
> 1. User wants bills from client x and program makes a
>
> select * from clients where name= x
>
> 2. Program displays x bills in some grid.
>
> 3. Later on, user wants x bills from march and I would like to make a
query in program like this
>
> select * from lastResultSet where moth(bill_date) = 'march'
>
> of course, in this particular example, I could have made a query like
>
> select * from clients where name= x and month(bill_date)= 'march'
>
> but sometimes the second query is not added so easily, you would have to
make some parsing to mix both queries.
> It would be a lot easier if there were some temporary result set and
apply filters to this temporary.
>
> Regards,
>
> Hector Rios
>
>
> 
>  From: Fabiano 
> To: mailto:firebird-support%40yahoogroups.com
> Sent: Friday, September 21, 2012 1:26 PM
> Subject: RES: [firebird-support] How to make queries to a temporary
result set
>
>
>
>
>
> Maybe:
>
> Select * from
>
> (
>
> select * from table where field1 = 1
>
> ) as FILTER
>
> Where FILTER.field2 = 2
>
> Fabiano.
>
> [Non-text portions of this message have been removed]
>
>
>
>
> [Non-text portions of this message have been removed]
>
>
>
> 
>
> ++
>
> Visit http://www.firebirdsql.org/ and click the Resources item
> on the main (top) menu.  Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com/
>
> ++
> Yahoo! Groups Links
>
>
>

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

   
  

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



RE: [firebird-support] Periodic database slowdown - troubleshooting steps?

2012-09-22 Thread Bob Murdoch
-Original Message-
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Bob Murdoch
Sent: Monday, September 17, 2012 10:27 AM

> I have an FB 2.1.5 Classic server running on a Windows 2003 server,
> with a single hard drive for the operating system, and a 3 disk raid
5
> array for the database.  We have one database on this machine, which
> is a dialect 1 database that was started on IB6.0 many years ago,
> currently at 90GB.  We have sweep disabled, and each night run gbak,
> gfix –sweep, as well as reindex all tables via a script.
>
> Once or twice per month, the system slows down tremendously.  One
ETL
> process typically runs at a pace of about 1000 records per 10
seconds.
> During these slow periods, the same ETL will run 1000 transactions
per
> 60-80 seconds.  When processing a file with 1mil+ records, this slow
> down costs us hours.

We have taken the database offline and did a full
backup/restore/replace, removing "no reserve", and setting the page
size to 16384.  The hardware is raid 5 running on 3 scsi hard drives
using NTFS 4k cluster size on Windows 2003 32bit with 4GB ram.  Using
IB Analyzer on the original database we found that there were a number
of indexes with a depth of 4, and a number of tables showing
fragmentation because of record size or blobs (not sure what that is
about).  

In this setup, should using a page size of 16384 with the same 2048
page buffers do a better job than the previous 8192 page size?  The
ondisk size of the db is now 93.4GB vs the old one at 91.2GB, which I
suppose is the 80% page fill and the larger pages.

Thanks for looking through this.

Bob M..









++

Visit http://www.firebirdsql.org and click the Resources item
on the main (top) menu.  Try Knowledgebase and FAQ links !

Also search the knowledgebases at http://www.ibphoenix.com 

++
Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/



Re: RES: [firebird-support] How to make queries to a temporary result set

2012-09-22 Thread Ann Harrison


On Sep 22, 2012, at 6:22 PM, HECTOR RIOS  wrote:

> Hi,
> Seems like temporary result set does not exist or at least nobody seems heard 
> about it.

Firebird makes an effortvto follow the SQL standard, which is not necessarily 
intuitive.  Undermthe standard, temporary tables are much less fluid than one 
might wish.  Our implementation reflexts the Standard, not ignorance.

Good luck,

Ann
>