Re: [firebird-support] Efficient subselects

2014-04-22 Thread Tim Ward
On 18/04/2014 10:29, Josef Kokeš wrote:
 On 18.4.2014 11:10, Thomas Beckmann wrote:
 Hi Josef,

 what I figured out to be quite handy, is to write something like:

 select
MASTER.*,
cast(left(S, 10) as bigint),
cast(substring(S from 10 for 10) as bigint),
cast(right(S, 10) as bigint),
 from (SELECT MASTER.ID,
  (SELECT
lpad(SUM(VALUE1), 10) ||
lpad(MAX(VALUE2), 10) ||
lpad(MIN(VALUE1), 10)
   FROM DETAIL
   WHERE DETAIL_ID=MASTER.ID) as S
FROM MASTER
WHERE NAME STARTING WITH 'A') s
 join MASTER m on m.ID = s.ID

 Thomas
 Interesting approach. I will consider it, maybe it would be sufficient
 for my needs.
Yes, I'll note this idea, I've got a similar query I'll probably have to 
speed up one day!

-- 
Tim Ward





++

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:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



[firebird-support] Cannot log into database

2014-04-22 Thread srotyliano
I don't know if this is Firebird or a BDE issue but I am trying to port a 
legacy client that runs on FB 1.5 from an XP system to a WIN7 (64 bit) system.
 

 I was able to install FB 1.56, the client software with its fdb onto the WIN7 
system. I also had to install BDE 5.01 since that is what the client uses. I 
redefined the ALIAS in BDE Administrator to point to the fdb on the WIN7 
system. 
 

 When I run the client trying to use the fdb on the WIN7 system I get an 
unknown user name or password error. If I point the ALIAS to the fdb on the 
old XP system I can run the client from the WIN7 system but it is accessing the 
fdb on the old system. This would be OK except I want to get rid of XP 
altogether and getthe database on the WIN7 system.
 

 With FlameRobin on the WIN7 system I can register and access the WIN7 fdb 
using the default username and passwords so it appears these are correct (they 
match those on the XP system). I can even run queries and see the data. 
However, when I try to open the WIN7 fdb through BDE Administrator I get the 
unknown user name or password error. My guess is that if we can get BDE to 
log into the fdb then the rest should fall in place (hopefully !).
 

 Has anyone else run into this ?


Re: [firebird-support] Cannot log into database

2014-04-22 Thread Thomas Steinmaurer
 I don't know if this is Firebird or a BDE issue but I am trying to port
 a legacy client that runs on FB 1.5 from an XP system to a WIN7 (64 bit)
 system.


 I was able to install FB 1.56, the client software with its fdb onto the
 WIN7 system. I also had to install BDE 5.01 since that is what the
 client uses. I redefined the ALIAS in BDE Administrator to point to the
 fdb on the WIN7 system.


 When I run the client trying to use the fdb on the WIN7 system I get an
 unknown user name or password error. If I point the ALIAS to the fdb
 on the old XP system I can run the client from the WIN7 system but it is
 accessing the fdb on the old system. This would be OK except I want to
 get rid of XP altogether and getthe database on the WIN7 system.


 With FlameRobin on the WIN7 system I can register and access the WIN7
 fdb using the default username and passwords so it appears these are
 correct (they match those on the XP system). I can even run queries and
 see the data. However, when I try to open the WIN7 fdb through BDE
 Administrator I get the unknown user name or password error. My guess
 is that if we can get BDE to log into the fdb then the rest should fall
 in place (hopefully !).


 Has anyone else run into this ?

Wow, BDE is still in business, even on Windows 7 64-bit.

A few things I would check:

* Which Firebird client library is loaded by the BDE?
* Are you using a local or TCP-based connection string?
* Just to be sure, but you have specified the username for the BDE 
alias, right?



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

Professional Tools and Services for Firebird
FB TraceManager, IB LogManager, Database Health Check, Tuning etc.


Re: [firebird-support] Cannot log into database

2014-04-22 Thread Helen Borrie
At 03:45 a.m. 23/04/2014, srotyli...@gmail.com wrote:


I don't know if this is Firebird or a BDE issue but I am trying to port a 
legacy client that runs on FB 1.5 from an XP system to a WIN7 (64 bit) system.


I was able to install FB 1.56, the client software with its fdb onto the WIN7 
system. I also had to install BDE 5.01 since that is what the client uses. I 
redefined the ALIAS in BDE Administrator to point to the fdb on the WIN7 
system. 

You are vague about what is where, e.g., is the client on a 64-bit or 32-bit 
system?  For certain your application is 32-bit because any Delphi version that 
worked with BDE 5.01 would have to be pre-Delphi 6 (which requires BDE 5.2).  A 
BDE version older than 5.2 will NOT run on Win 7.  You can search for a BDE 5.2 
download or you can download a self-installing executable from here: 
http://www.greatknitdesigns.com/Downloads/BDEInfoSetup.exe  I can verify that 
(at least) this will install and run correctly on Win7 32-bit as I recently 
upgraded my Netbook to Win7 and needed it to run my knitwear design software 
there.  The back-end of that software is Paradox, though, not InterBase.  I do 
notice that the IB driver is younger than everything else in that kit so it is 
most likely the driver that Borland fixed in Update 2 of Delphi 6.

When I run the client trying to use the fdb on the WIN7 system I get an 
unknown user name or password error. If I point the ALIAS to the fdb on the 
old XP system I can run the client from the WIN7 system but it is accessing 
the fdb on the old system. 

This doesn't make sense.  You'll need to clarify what you mean by fdb on the 
old system.  Copy/paste the actual entries in the BDE manager.

This would be OK except I want to get rid of XP altogether and getthe database 
on the WIN7 system.

To offer some form of clarity on the client-side issues, the BDE is part of the 
client layer.  The VCL components in the client app connect to the BDE which, 
in turn, connects to gds32.dll.  To connect to a Firebird database, your 
gds32.dll will have to be a renamed fbclient.dll from the Fb 1.5.6 kit and it 
should be located in the correct bitness folder on Win 7.  If the client 
machine is running Win7 64-bit then gds32.dll must be in c:\Windows\SysWOW64;  
if running Win32-bit then it should be in the ..\system32 folder.


With FlameRobin on the WIN7 system I can register and access the WIN7 fdb 
using the default username and passwords so it appears these are correct (they 
match those on the XP system).

FlameRobin (a) doesn't use the BDE and (b) knows that fbclient.dll is the 
correct client for Firebird.

 I can even run queries and see the data. However, when I try to open the WIN7 
 fdb through BDE Administrator I get the unknown user name or password 
 error. My guess is that if we can get BDE to log into the fdb then the rest 
 should fall in place (hopefully !).

Hopefully, though no guarantees.  Everything you are using there is very 
ancient, all stuff that pre-existed even XP.  So, hold your breath...


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