[firebird-support] Shutting down while changing metadata

2012-08-06 Thread Aldo Caruso
Hi,

   Normally, when I make a modificacion to the metadata ( DDL ) I shut 
down the database because it is not clear to me what happens if I alter 
a table or a stored procedure while it is being used or invoked by 
another user.
Is it actually necessary to shut down the database in order to do 
metadata changes in a production environment ?

Thanks in advance,
Aldo Caruso


Re: [firebird-support] Moving primary key to another column

2012-08-06 Thread Tomasz Tyrakowski
On 2012-08-05 19:26, Matthias Hanft wrote:
 Now I don't want to be NBR the primary key any more (the numbers there
 have a special meaning where I need to have some 0 entries now); I'd
 like to insert another ID colum which should be the new primary key
 (and filling it automatically from 1 to N by a generator).

Matthias,

That's the procedure I've been using in the past in such cases:

1. drop the current primary key (alter table MyTable drop constraint 
OldPrimaryKeyName)
2. create the generator (create generator MyGen)
3. create the new primary key column (alter table MyTable add NewKey not 
null)
4. fill the new column using the generator:
update MyTable set NewKey=(select gen_id(MyGen,1) from RDB$DATABASE)
5. create the primary key anew (alter table MyTable add constraint 
NewPrimaryKeyName primary key(NewKey) )

No extra table required.

regards
Tomasz

-- 
__--==--__
__--== Tomasz Tyrakowski==--__
__--==SOL-SYSTEM==--__
__--== http://www.sol-system.pl ==--__
__--==--__




++

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] Moving primary key to another column

2012-08-06 Thread Tomasz Tyrakowski
On 2012-08-06 14:33, Tomasz Tyrakowski wrote:
 3. create the new primary key column (alter table MyTable add NewKey not
 null)

It should have been
alter table MyTable add NewKey integer not null
Forgot the column type. Sorry for that.

Tomasz


-- 
__--==--__
__--== Tomasz Tyrakowski==--__
__--==SOL-SYSTEM==--__
__--== http://www.sol-system.pl ==--__
__--==--__




++

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/



[firebird-support] Re: UN and PW not defined ... error message on Windows 7 (not XP)

2012-08-06 Thread venussoftop
--- In firebird-support@yahoogroups.com, Mark Rotteveel mark@... wrote:

 On 4-8-2012 16:06, venussoftop wrote:
  Hi all
 
  I have an app that uses FireBird is being used regularly on Windows XP 
  pretty nicely.
 
  Now when I install the same app on Windows 7 I am still able to enter data 
  as I normally would using connect string
 
  The problem arises when I try to print the reports via Report Manager (from 
  sourceforge) ActiveX using connect string then it does not work.
 
  If I use the same report via ODBC then it works in the Report Manager 
  designer then it works.
 
  The error I get is:
  [odbc Firebird Driver] your User Name And Password Are Not Defined. Ask 
  Your Database Administrator To Set Up A Firebird Login.
 
  I have even tried to create a user using FlameRobin of the Windows user 
  name but of course the Space in the Win User Name is not possible for the 
  user name in FireBird.
 
  This all in all is not an issue in Win XP so what might happen differently 
  in Windows 7
 
  Please advise
 
 How do you connect, what is your connection string when it doesn't work?
 
 Mark
 
 -- 
 Mark Rotteveel



Thanks Mark.  The following are the connect strings on that are passed for 
conenctivity:

If the app is installed as a node:
Driver=Firebird/InterBase(r) 
driver;Uid=SYSDBA;Pwd=masterkey;DbName=servername:fdbaliasname;

If the app is installed as a server:
Driver=Firebird/InterBase(r) 
driver;Uid=SYSDBA;Pwd=masterkey;DbName=C:\ProgramData\appfoldername\datafoldername\databasename.fdb;

The issue is the same for both the above string.  These same strings work on 
the XP Machine though

The database files are physically present I have confirmed that.

Please advise.

Thanks and regards
Bhavbhuti





Re: [firebird-support] Moving primary key to another column

2012-08-06 Thread Matthias Hanft
Tomasz Tyrakowski wrote:

 That's the procedure I've been using in the past in such cases:
[...]

Thank you very much; I'll save this useful instruction manual for later :-)

 1. drop the current primary key (alter table MyTable drop constraint
 OldPrimaryKeyName)

That's what I wanted to do, but I didn't remember drop constraint.
I just tried drop index, but it wouldn't let me do this because of
cannot drop index because index is primary key (or something similar).
So I thought it might be not possible at all.

 4. fill the new column using the generator:
 update MyTable set NewKey=(select gen_id(MyGen,1) from RDB$DATABASE)

Brilliant :-) (I already wondered how to fill up an incrementing
column automagically.)

Thanks again,

-Matt





++

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] Moving primary key to another column

2012-08-06 Thread Milan Babuskov
Matthias Hanft wrote:
 4. fill the new column using the generator:
 update MyTable set NewKey=(select gen_id(MyGen,1) from RDB$DATABASE)

update MyTable set NewKey = gen_id(MyGen,1);



 Brilliant :-) (I already wondered how to fill up an incrementing
 column automagically.)

Well, now you know of 2 ways to do it ;)

-- 
Milan Babuskov

==
The easiest way to import XML, CSV
and textual files into Firebird:
http://www.guacosoft.com/xmlwizard
==





++

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/



[firebird-support] Error Failed to load gds32.dll

2012-08-06 Thread himanshu
Hello all,
I am new to this world of connecting and converting databases.
I am trying to convert a database from one format to the other.
It was recommended in the set instructions written by the previous author to 
use Firebird, and hence I am here.

I am using Windows XP (32 bit only) and Windows 7 (32 and 64 bit) versions. 
(lot to handle here).

I installed Firebird and then tried to connect the database. The system gave me 
following error message

Failed to load gds32.dll (#-904)

I am unable to understand what it means, why it appears and how to fix it. 
Wondering if anyone can help me here. 

I will greatly appreciate any help

regards,
Himanshu Bahirat




Re: [firebird-support] Error Failed to load gds32.dll

2012-08-06 Thread Alexandre Benson Smith
Em 6/8/2012 13:28, himanshu escreveu:
 Hello all,
 I am new to this world of connecting and converting databases.
 I am trying to convert a database from one format to the other.
 It was recommended in the set instructions written by the previous author to 
 use Firebird, and hence I am here.

 I am using Windows XP (32 bit only) and Windows 7 (32 and 64 bit) versions. 
 (lot to handle here).

 I installed Firebird and then tried to connect the database. The system gave 
 me following error message

 Failed to load gds32.dll (#-904)

 I am unable to understand what it means, why it appears and how to fix it. 
 Wondering if anyone can help me here.

 I will greatly appreciate any help

 regards,
 Himanshu Bahirat


When you got this message ? what application are you using to connect ?

Perhaps a 32 bits app trying to load a 64 bits DLL ???

see you !


[firebird-support] Re: Error Failed to load gds32.dll

2012-08-06 Thread Eduardo A
 I installed Firebird and then tried to connect the database. The system gave 
 me following error message
 
 Failed to load gds32.dll (#-904)

When you installed the Firebird version, did you tell it to create a version of 
gds32.dll (which is really more like FBClient.dll but reports itself as version 
6.x of gds32)?

AFAIK, Firebird uses FBClient.DLL from its bin directory and does not copy it 
to the System32, nor does it copy the gdds32.dll there unless you insist that 
it do so.  So if you app is looking for gds32 it may be missing it because it 
was not created or because it is looking for it in the wrong place or even 
because the MS redistributables needed for the new client may not be installed 
in the client PC.

So, consider uninstalling and reinstalling paying attention to the check boxes 
that tell the install program what to do with gds32.dll.

Hope this helps.

-Eduardo



Re: [firebird-support] Re: Error Failed to load gds32.dll

2012-08-06 Thread Matthias Hanft
Eduardo A wrote:

 So, consider uninstalling and reinstalling paying attention to the check 
 boxes that tell the
 install program what to do with gds32.dll.

IMHO looking for a file called fbclient.dll somewhere on your hard
disk and copying it as gds32.dll to C:\Windows\System32 should be
sufficient (C:\Windows\SysWOW64 on 64-bit Windows).

gds32.dll is used by Delphi programs (at least, Delphi 7).

-Matt


[firebird-support] REPLACE() Retaining EOF marker from BLOB

2012-08-06 Thread red_october2009
BACKGROUND INFO:

I have a stored procedure with two BLOB SUB_TYPE 1 variables declared.  One 
contains a letter template, the other contains the letter text.  In the 
template I have the character string [LETTER_BODY] at the place where I want 
the letter text to appear.  (It is placed in the middle of the template..  
there is standard text in the template that appears after the [LETTER_BODY] 
character string.

Here is what I do in the stored procedure:

...
  DECLARE vLTR_TXT BLOB SUB_TYPE 1;
  DECLARE vCHT_TXT BLOB SUB_TYPE 1;
...
--Both variables are populated from BLOB SUB_TYPE 1 fields in two different 
tables.
...

  vLTR_TXT = REPLACE(:vLTR_TXT, '[LETTER_BODY]', :vCHT_TXT); 
...
-- The vLTR_TXT is then used in an UPDATE statement to save the new letter text 
to a BLOB SUB_TYPE 1 field in yet another table.

The REPLACE() correctly replaces the [LETTER_BODY] tag with the text contained 
in :vCHT_TXT variable.  Text in the template that occurs BEFORE the 
[LETTER_BODY] tag is still there, however, a problem occurs, in that NO TEXT 
AFTER what was inserted from the :vCHT_TXT variable is preserved.  It's as if 
there is an EOF marker at the end of :vCHT_TXT that is being obeyed by the 
:vLTR_TXT BLOB.

Note that this problem DOES NOT OCCUR if I use a hard coded string value. Like:

  vLTR_TXT = REPLACE(:vLTR_TXT, '[LETTER_BODY]', 'My String'); 


QUESTION:

Is there a way of removing the EOF character at the end of :vCHT_TXT so that it 
looks like a simple string?  I don't want to change :vCHT_TXT to a 
VARCHAR(32000) because it is conceivable that a user could enter more than 5 
pages of text (more than 32000 characters).
(Or will removing that character cause a malfunction of FB?)

Is there any other suggestions that will solve this problem?  (I've tried 
declaring the variables as BLOB SUB_TYPE 0, makes no difference.. same problem 
occurs)


-- Thanks in advance for any help you can provide.