Re: [firebird-support] Re: AV in fbembed.dll_unloaded

2014-08-02 Thread Markus Ostenried mac...@gmail.com [firebird-support]
On Sat, Aug 2, 2014 at 3:11 PM, tobias_subscri...@tgtools.com
[firebird-support] firebird-support@yahoogroups.com wrote:
 Wow, many thanks! I can't believe it ... and there is not a trace of this
in IBO? Very strange ... so I need to grab IBO's DLL handle and get the
function address myself, OK ... I can do it ... but I am still shocked.

Why don't you ask Jason on the IBO mailing list?
Maybe he's already got a solution ready for you.
And if not then I assume he'll be eager to fix this.


Re: [firebird-support] EXECUTE STATEMENT problem understanding

2013-07-26 Thread Markus Ostenried
On Fri, Jul 26, 2013 at 12:26 PM, Alan J Davies 
alan.dav...@aldis-systems.co.uk wrote:

 **


 Thanks Mark, it appears that what I want to do is not possible. i.e.
 have the table name as a replaceable parameter. Using your example I
 would still have 3 separate statements (as now) but in a different
 format in the SP.
 What I really would like to be able to do is (paraphrase):
 declare table_to_use varchar(20);
 if my_input_parameter='T' then table_to_use='q_tool'
 else if my_input_parameter='G' then table_to_use='q_gauge'
 else if my_input_parameter='P' then table_to_use='q_ppap'
 end;
 and then this code only once in the SP.

 s = 'update :table_to_use set tgp_no = :tgp_no, del_date = :del_date
 where pjs_no = :pjs_no'
 EXECUTE STATEMENT (s) (tgp_no := tgp_no, del_date := del_date, pjs_no
 := pjs_no);

 Regards

 Alan


Your s is just a string. You don't have to use parameters you can
concatenate it like this:

s = 'update ' || table_to_use || ' set.';

HTH,
Markus


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



Re: [firebird-support] Number list without table

2013-07-25 Thread Markus Ostenried
On Thu, Jul 25, 2013 at 8:46 PM, Piotr Olszewski 
piotr.olszew...@eskrzynka.pl wrote:

 **

 I need to get list of number (f.e 1,2,3,4,5) as rows but using only SQL
 query (without extra table or view).


Hi there,

looks like Sean answered faster than me.

Here's the documentation for what you want (search the page for Our last
example):
http://www.firebirdsql.org/refdocs/langrefupd20-execblock.html

HTH,
Markus


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



Re: [firebird-support] Cannot transliterate character between character sets.

2013-07-23 Thread Markus Ostenried
On Tue, Jul 23, 2013 at 3:40 PM, Olaf Kluge olaf.kl...@satron.de wrote:

 **

 I have created a stroed procedure to find the records. There are some with
 the mm² (²) (pow) and I get the error messeage with ibexpert. But I was
 wondering, our Java (jaybird) application displays me all records, also the
 problematic. The charset is in every case ISO8859_1. What cen be the reason
 for this difference?

I assume ISO8859_1 is the character set of your column.
What is the character set of your connection -- IBExpert vs Java
application?
Maybe that's where they differ.

HTH,
Markus


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



Re: [firebird-support] How do return the number of object in a Firebird database

2013-07-17 Thread Markus Ostenried
On Wed, Jul 17, 2013 at 1:55 PM, Softtech Support stwiz...@att.net wrote:

 **


 Greetings All,

 v1.5.3

 I need to know how many tables, indicies, functions, stored procedures,
 etc are in my Firebird database.

 Is there a quick way to determine this?

See here, this should provide you with enough information:
http://www.alberton.info/firebird_sql_meta_info.html


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



Re: [firebird-support] FireBird 2.5 How can i create 1 byte (0-255) column?

2013-04-03 Thread Markus Ostenried
On Wed, Apr 3, 2013 at 5:25 PM, Ann Harrison aharri...@ibphoenix.comwrote:

 **
 I think what you want is :

 CHAR[1] Character Set Octets

 Don't use VARCHAR[1] - that will make each one three bytes long. And be
 careful of the layout of your records. For example, if you sandwich your
 CHAR[1] between two integer columns, you'll get three bytes of padding so
 the integers align on natural boundaries.


Out of curiosity:
Can the sandwich problem be controlled via alter position? IOW does
column position affect the record layout on disk?


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



Re: [firebird-support] Newbies queries on type of data files and recovery options

2011-09-28 Thread Markus Ostenried
On Wed, Sep 28, 2011 at 15:58, Rohit Coder
passionate_program...@hotmail.com wrote:
 2. What is the table and data file max-size for version 2.5?
http://www.firebirdfaq.org/faq61/

  3. What are the common scenarios of a Firebird data file getting corrupt? In 
 case of a single-file structure, I guess no other files need to be backed up?
In over ten years the only corruptions I've seen were due to

1) Full hard disk: IIRC in this case Firebird will overwrite the file
from the beginning. Not good, but checking for free space on every
write would slow down writes too much. Just make sure you have enough
space.

2) Sudden power loss: Normally Firebird will just throw away the last
unfinished transaction, sometimes a quick (seconds in my cases) repair
with gfix tool was needed.

3) Not really a corruption but it comes up here occasionally so I'll
mention it: You can add a NOT NULL column to an existing table that
already contains records. Then it's up to you to fill that column with
values, or else Firebird will complain when you next *restore* the
database from a backup. But there's a command line switch to ignore
that complaining, so it's not a big problem.

HTH,
Markus


Re: [firebird-support] Newbies queries on type of data files and recovery options

2011-09-28 Thread Markus Ostenried
On Wed, Sep 28, 2011 at 18:48, Alexey Kovyazin a...@ib-aid.com wrote:
 1) Full hard disk: IIRC in this case Firebird will overwrite the file
 from the beginning. Not good, but checking for free space on every
 write would slow down writes too much. Just make sure you have enough
 space.


 This is far from true. Overwriting was an issue in Interbase 5.x.
 Lack of free space was solved with pre-allocation in recent Firebird
 versions - it will raise non-critical error.

Thanks for the correction. I knew it was a long time ago =)


Re: [firebird-support] Migration from 2.1 UNICODE_FSS to 2.5 UTF8

2011-09-20 Thread Markus Ostenried
On Tue, Sep 20, 2011 at 13:14, majstor majst...@yahoo.com wrote:
 Hi Firebird Masters,

 Does anybody know an ideal tool for transfering data from Firebird database 
 ver 2.1.x UNICODE_FSS to 2.5 UTF8, I'll try a lot of free or demo tools but 
 same error with malware string are there. I just don't know how to solve this 
 problem...

The database migration process might require some special steps. If
the database restore fails with the error malformed string for you,
please pay attention to the files in the /misc/upgrade/metadata
directory of your installation and use the new -fix_fss_data and
-fix_fss_metadata command line switches of GBAK.
quoted from:
http://www.ib-aid.com/articles/item118

Read the docs mentioned above (/misc/upgrade/metadata).
Here's a usage example (I didn't try it, just googled for fix_fss_data):
http://tech.groups.yahoo.com/group/firebird-support/message/110416

HTH,
Markus


Re: [firebird-support] Timer in firebird?

2011-09-12 Thread Markus Ostenried
On Mon, Sep 12, 2011 at 10:30, Olaf Kluge olaf.kl...@satron.de wrote:
 I would like to send all 30 seconds an event to the connected client to
 confirm the connection. How can I realize that? There are different clients
 connected, for each I need this function.

Howdy,

AFAIK there is no functionality to do this from inside the database.
Can you tell us what you're trying to achieve? Maybe there is another
way to do what you want.

E.g. I needed to count the number of client applications already
connected to the database at application startup: The client which
needed that number would post an event for which all clients were
listening. When received every client would insert a record into a
table which could then be counted.

If you're just interested in all connections to the database you could
use the monitoring tables in newer versions of Firebird
(MON$ATTACHMENTS), see here:
http://www.ibphoenix.com/resources/documents/search/doc_3

Or maybe you could use an ON CONNECT trigger:
http://www.firebirdsql.org/refdocs/langrefupd21-ddl-trigger.html

HTH,
Markus


Re: [firebird-support] how to put null at the end in oder by ASC

2011-08-30 Thread Markus Ostenried
On Tue, Aug 30, 2011 at 10:20, Vander Clock Stephane
svandercl...@yahoo.fr wrote:
 Hello,

 how to put the num value at the end of the result (and not at the
 beginning) when we are doing

 select xxx order by xxx ASC

Howdy,
maybe this helps:

select xxx from tbl order by xxx asc NULLS FIRST

Bye,
Markus


Re: [firebird-support] Re: Truncate table

2011-08-23 Thread Markus Ostenried
On Tue, Aug 23, 2011 at 13:33, ck1625 ch.kaufm...@splash-software.ch wrote:
 My problem is still there. It's only with FB 2.5; with FB 1.5 it is not that 
 slow.

 I thought, the solution is this:
 DELETE FROM table
 SELECT * FROM table

 But it looks like it doesn't work. It is still random when time is lost to 
 do the cleanup work.

Have you tried SELECT Count(*) FROM table ?
This should trigger garbage collection.

HTH,
Markus