[firebird-support] Get/set context in derived table context

2015-03-19 Thread masb...@za-management.com [firebird-support]
Hi all,
I have the need to implement something like a row number and read the last 
thread about the autoincrement number which also led me to this FAQ:
http://www.firebirdfaq.org/faq343/ http://www.firebirdfaq.org/faq343/  
I now tried something like this:

select
cast(rdb$get_context('USER_TRANSACTION', 'row#2') as integer) as row_number,
rdb$set_context('USER_TRANSACTION', 'row#2',
coalesce(cast(rdb$get_context('USER_TRANSACTION', 'row#2') as integer), 0) + 1) 
as SET_CONTEXT,
other columns
from mytable

Which works fine. The first thing I now did is to create a derived table to get 
rid of the SET_CONTEXT part. I now experienced something very strange to me.

When I did this:

select s.* from
(select
cast(rdb$get_context('USER_TRANSACTION', 'row#2') as integer) as row_number,
rdb$set_context('USER_TRANSACTION', 'row#2',
coalesce(cast(rdb$get_context('USER_TRANSACTION', 'row#2') as integer), 0) + 1) 
as SET_CONTEXT,
other columns
from mytable) s

all is fine and row numbers are fine.

But when I explicitely call the individual rows like this;

select 
s.row_number,
s.other columns
from
(select
cast(rdb$get_context('USER_TRANSACTION', 'row#2') as integer) as row_number,
rdb$set_context('USER_TRANSACTION', 'row#2',
coalesce(cast(rdb$get_context('USER_TRANSACTION', 'row#2') as integer), 0) + 1) 
as SET_CONTEXT,
other columns
from mytable) 

then the row numbers have all the same value namely the last counter position 
(highest last value).

Am I doing something wrong?

Kind regards Christian


 



Re: [firebird-support] unable to complete network request to host

2015-03-19 Thread Ekundayo eday...@yahoo.com [firebird-support]
I think your administrator is making changes to your Win2k8 server firewall.The 
reason you cant ping, but the app connects is most likely because ICMP Echo 
(ping) has been blocked via the firewall.
Ive also had strange issues come up (in the past) when I configure my client 
app to connect using the servers hostname.I'd suggest that you do the following 
(if its possible):1 - use the servers IP address as opposed to its hostname, 
2 - ask your administrator to allow port 3050 (I'm assuming that you are using 
the default FB ports) 

 Regards.


 On Thursday, March 19, 2015 9:44 AM, zilez2...@yahoo.com 
[firebird-support] firebird-support@yahoogroups.com wrote:
   

     Hi Group, 

i have a problem with unable to complete network request to host .
I have a database on Win2008 Server with Firebird 2.5.3. on it. Untill recently 
everything worked fine. Now, My program which should check are there any new 
web orders randomly work / not work. 

Situation is very strange I think we have problems with network, but I dont 
understand how to resolve it.  For example, At the momment I cant ping server, 
but the program works fine !!! Sometimes it doesnt work even if I can ping 
server. 

I know this is quite difficult, but if someone can give me some directions 
where to searh for the sollution.

Regards,

Zoran

  #yiv0427773731 #yiv0427773731 -- #yiv0427773731ygrp-mkp {border:1px solid 
#d8d8d8;font-family:Arial;margin:10px 0;padding:0 10px;}#yiv0427773731 
#yiv0427773731ygrp-mkp hr {border:1px solid #d8d8d8;}#yiv0427773731 
#yiv0427773731ygrp-mkp #yiv0427773731hd 
{color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px 
0;}#yiv0427773731 #yiv0427773731ygrp-mkp #yiv0427773731ads 
{margin-bottom:10px;}#yiv0427773731 #yiv0427773731ygrp-mkp .yiv0427773731ad 
{padding:0 0;}#yiv0427773731 #yiv0427773731ygrp-mkp .yiv0427773731ad p 
{margin:0;}#yiv0427773731 #yiv0427773731ygrp-mkp .yiv0427773731ad a 
{color:#ff;text-decoration:none;}#yiv0427773731 #yiv0427773731ygrp-sponsor 
#yiv0427773731ygrp-lc {font-family:Arial;}#yiv0427773731 
#yiv0427773731ygrp-sponsor #yiv0427773731ygrp-lc #yiv0427773731hd {margin:10px 
0px;font-weight:700;font-size:78%;line-height:122%;}#yiv0427773731 
#yiv0427773731ygrp-sponsor #yiv0427773731ygrp-lc .yiv0427773731ad 
{margin-bottom:10px;padding:0 0;}#yiv0427773731 #yiv0427773731actions 
{font-family:Verdana;font-size:11px;padding:10px 0;}#yiv0427773731 
#yiv0427773731activity 
{background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;padding:10px;}#yiv0427773731
 #yiv0427773731activity span {font-weight:700;}#yiv0427773731 
#yiv0427773731activity span:first-child 
{text-transform:uppercase;}#yiv0427773731 #yiv0427773731activity span a 
{color:#5085b6;text-decoration:none;}#yiv0427773731 #yiv0427773731activity span 
span {color:#ff7900;}#yiv0427773731 #yiv0427773731activity span 
.yiv0427773731underline {text-decoration:underline;}#yiv0427773731 
.yiv0427773731attach 
{clear:both;display:table;font-family:Arial;font-size:12px;padding:10px 
0;width:400px;}#yiv0427773731 .yiv0427773731attach div a 
{text-decoration:none;}#yiv0427773731 .yiv0427773731attach img 
{border:none;padding-right:5px;}#yiv0427773731 .yiv0427773731attach label 
{display:block;margin-bottom:5px;}#yiv0427773731 .yiv0427773731attach label a 
{text-decoration:none;}#yiv0427773731 blockquote {margin:0 0 0 
4px;}#yiv0427773731 .yiv0427773731bold 
{font-family:Arial;font-size:13px;font-weight:700;}#yiv0427773731 
.yiv0427773731bold a {text-decoration:none;}#yiv0427773731 dd.yiv0427773731last 
p a {font-family:Verdana;font-weight:700;}#yiv0427773731 dd.yiv0427773731last p 
span {margin-right:10px;font-family:Verdana;font-weight:700;}#yiv0427773731 
dd.yiv0427773731last p span.yiv0427773731yshortcuts 
{margin-right:0;}#yiv0427773731 div.yiv0427773731attach-table div div a 
{text-decoration:none;}#yiv0427773731 div.yiv0427773731attach-table 
{width:400px;}#yiv0427773731 div.yiv0427773731file-title a, #yiv0427773731 
div.yiv0427773731file-title a:active, #yiv0427773731 
div.yiv0427773731file-title a:hover, #yiv0427773731 div.yiv0427773731file-title 
a:visited {text-decoration:none;}#yiv0427773731 div.yiv0427773731photo-title a, 
#yiv0427773731 div.yiv0427773731photo-title a:active, #yiv0427773731 
div.yiv0427773731photo-title a:hover, #yiv0427773731 
div.yiv0427773731photo-title a:visited {text-decoration:none;}#yiv0427773731 
div#yiv0427773731ygrp-mlmsg #yiv0427773731ygrp-msg p a 
span.yiv0427773731yshortcuts 
{font-family:Verdana;font-size:10px;font-weight:normal;}#yiv0427773731 
.yiv0427773731green {color:#628c2a;}#yiv0427773731 .yiv0427773731MsoNormal 
{margin:0 0 0 0;}#yiv0427773731 o {font-size:0;}#yiv0427773731 
#yiv0427773731photos div {float:left;width:72px;}#yiv0427773731 
#yiv0427773731photos div div {border:1px solid 
#66;height:62px;overflow:hidden;width:62px;}#yiv0427773731 
#yiv0427773731photos div label 

[firebird-support] Re: Get/set context in derived table context

2015-03-19 Thread masb...@za-management.com [firebird-support]
What I initially wanted to do with this approach is join two datasets from 
different and different context variables sources with the row numbers as join 
criteria, which does not work at all, even when the individual queries show 
matching row numbers.

BTW I start all processes with a set_context step, to set the desired starting 
point for both variables to make the row number match.

Kind regards from Hamburg
Christian

Re: [firebird-support] Revert DB to previous version

2015-03-19 Thread Andrei Luís compuvale.softw...@gmail.com [firebird-support]
Yes!

[]s
Andrei

2015-03-18 14:37 GMT-03:00 sboyd...@gmail.com [firebird-support] 
firebird-support@yahoogroups.com:



 Andrei;

 If I understand what you are saying, you want me to copy gbak.exe for
 2.0.5 to the 2.1 system and use the 2.0.5 gbak to back up the 2.1 database
 using the 2.1 Firebird service. Correct?


 



[firebird-support] Firebird 2.5 multi-core support

2015-03-19 Thread David Nock dav...@accessitsoftware.com [firebird-support]


Hi,


I'm just trying to clarify the status of multiprocessor/multicore 
support in Firebird 2.5. I have found the architecture comparison page 
which starts to explain this.


http://www.firebirdsql.org/manual/qsg25-appx-architectures.html


1. For Windows, we just need to update the CpuAffinityMask.
2. For Linux it states that CpuAffinityMask is ignored. Does that mean 
it will use multiple cores or not?
3. What about Mac OS X?


Thanks,
Dave




Re: [firebird-support] Get/set context in derived table context

2015-03-19 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
If you can read Spanish, this article shows several methods for having row
numbers in the SELECT.

https://firebird21.wordpress.com/2013/05/13/numerando-las-filas-de-un-select/

Greetings.

Walter.


On Thu, Mar 19, 2015 at 5:28 AM, masb...@za-management.com
[firebird-support] firebird-support@yahoogroups.com wrote:



 Hi all,
 I have the need to implement something like a row number and read the last
 thread about the autoincrement number which also led me to this FAQ:
 http://www.firebirdfaq.org/faq343/


 I now tried something like this:

 select
 cast(rdb$get_context('USER_TRANSACTION', 'row#2') as integer) as
 row_number,
 rdb$set_context('USER_TRANSACTION', 'row#2',
 coalesce(cast(rdb$get_context('USER_TRANSACTION', 'row#2') as integer), 0)
 + 1) as SET_CONTEXT,
 other columns
 from mytable

 Which works fine. The first thing I now did is to create a derived table
 to get rid of the SET_CONTEXT part. I now experienced something very
 strange to me.

 When I did this:

 select s.* from
 (select
 cast(rdb$get_context('USER_TRANSACTION', 'row#2') as integer) as
 row_number,
 rdb$set_context('USER_TRANSACTION', 'row#2',
 coalesce(cast(rdb$get_context('USER_TRANSACTION', 'row#2') as integer), 0)
 + 1) as SET_CONTEXT,
 other columns
 from mytable) s

 all is fine and row numbers are fine.

 But when I explicitely call the individual rows like this;

 select
 s.row_number,
 s.other columns
 from
 (select
 cast(rdb$get_context('USER_TRANSACTION', 'row#2') as integer) as
 row_number,
 rdb$set_context('USER_TRANSACTION', 'row#2',
 coalesce(cast(rdb$get_context('USER_TRANSACTION', 'row#2') as integer), 0)
 + 1) as SET_CONTEXT,
 other columns
 from mytable)

 then the row numbers have all the same value namely the last counter
 position (highest last value).

 Am I doing something wrong?

 Kind regards Christian



  



[firebird-support] Read errror 10054

2015-03-19 Thread dtav...@yahoo.com [firebird-support]
Hi, all!
 

 I believe I am not the first with this question, but it kind of bothers me a 
lot. We have:
 
Firebird 2.0.7.13318(win32) on 
 Windows 2008R2 on 
 VMware ESX 5.5, Virtual HW version 10 on 
 HP BL465 Gen8 (AMD Opteron 6376) .

 

 
 Client is a Win32 Delphi written application, using Devart's IBDAC library to 
connect to the database. All instances of the application run in sessions on 
this server, so there should be no physical influence on the TCP protocol.
 

 No matter what, the Firebird.log file keeps piling up the Read error 10054 
records, sometimes none in a week, sometimes six or seven occurences a day.
 

 I would greatly appreciate some sound advice on what to check, maybe some 
configuration settings secrets or so.
 

 Thank You very much on Your time and experience!
 

 

 Davor Tavcar
 

 



Re: [firebird-support] Revert DB to previous version

2015-03-19 Thread sboyd...@gmail.com [firebird-support]
That worked great! Thank you! 



Re: [firebird-support] Read errror 10054

2015-03-19 Thread Helen Borrie hele...@iinet.net.au [firebird-support]
At 05:36 a.m. 20/03/2015, dtav...@yahoo.com [firebird-support] wrote:

No matter what, the Firebird.log file keeps piling up the Read error 10054 
records, sometimes none in a week, sometimes six or seven occurences a day.

I would greatly appreciate some sound advice on what to check, maybe some 
configuration settings secrets or so.

That is the Connection Reset error, from the network.  It indicates that one 
end of a connection has been lost in a way that is not recoverable.  Assuming 
it is not the server that is crashing, look at the client end.  
--You may have a user who habitually ends a session by switching off the 
computer without terminating the application;  or simply disconnects a laptop 
from the network while in a session
--Or perhaps an application that crashes, or times out in an untidy fashion.
--Or a logical or hardware fault somewhere in the network


Helen Borrie, Support Consultant, IBPhoenix (Pacific)
Author of The Firebird Book and The Firebird Book Second Edition
http://www.firebird-books.net
__