[firebird-support] How to do a local backup with TIBBackupService?

2017-05-10 Thread Sergio Garcia sergiogarciar...@gmail.com [firebird-support]
server is. Is this how it is supposed to work? Best regards, Sergio

[firebird-support] Procedure inside another procdure

2014-07-11 Thread Sergio Garcia sergiogarciar...@gmail.com [firebird-support]
Hi All. Can I create a procedure inside another procedure? Something like this: SET TERM ^; RECREATE PROCEDURE proc AS DECLARE VARIABLE tmp INTEGER; PROCEDURE insideproc AS BEGIN . END; BEGIN . END; SET TERM ;^ Best regards, Sergio

[firebird-support] guest user

2013-06-19 Thread Sergio
Hello, sorry if this is a silly question, but I'm googling it and can't find the answer... I need to create test user which is not allowed to drop or alter anything of the database metadata. Just read or write records from some tables... I'm using FB 2.5 Thanks!

[firebird-support] Delphi XE2. Migrating from IBX components

2013-03-08 Thread Sergio
opinions regarding what component to use in Delphi. Is there any free one? Thanks in advance! Sergio

[firebird-support] Optimal variant

2013-01-30 Thread Sergio Garcia
, V.field2_T2 FROM my_view V WHERE V.field1_T1 = param1 AND V.field1_T2 = param2 INTO :field1_T1, :field2_T1, :field1_T2, :field2_T2 DO BEGIN SUSPEND; END END^ SET TERM ;^ Best Regards, Sergio PD

[firebird-support] database over internet

2013-01-09 Thread Sergio
advice!! sergio

[firebird-support] UDF 64 bits

2012-12-04 Thread Sergio H. Gonzalez
SG_DES is not defined. module name or entrypoint could not be found. The DLL was rebuilded with Delphi XE2 for 64 bits... thanks! sergio [Non-text portions of this message have been removed]

[firebird-support] Re: UDF 64 bits

2012-12-04 Thread Sergio
The DLL was rebuilded with Delphi XE2 for 64 bits... thanks! sergio Maybe the problem is that we have to re-compile our dll's as 64 bits. Piotr Thanks Piotr! I did it... probably I'm missing something at that point? Anyway, the location of the DLL

[firebird-support] problem with UDF in 64 bits Firebird

2012-10-26 Thread Sergio
Hello! I had a very simple UDF which I used in my 32 bits app, now I've changed the PC, and installed FB 64, and the UDF stopped working. I get this message: can't format message 13:896 -- message file C:\Windows\firebird.msg not found. invalid request BLR at offset 59. function SG_DES is not

[firebird-support] Re: problem with UDF in 64 bits Firebird

2012-10-26 Thread Sergio
\Firebird_2_5\UDF\sgudf.dll So, that should be ok, isn't it? sergio.

[firebird-support] problem with restore

2012-09-12 Thread Sergio
Hello! I'm having a problem when I restore a database (just in case: the backup was made with -meta_data option) I'm getting this error message, but I can't find where is the RDB$INDEX_39. I use FlameRobin... gbak:restoring SQL role: RDB$ADMIN gbak: ERROR:attempt to store duplicate value

Re: RES: [firebird-support] problem with restore

2012-09-12 Thread Sergio
Thanks Fabiano! By mistake, I was using an old gbak with a 2.5 databse. With the correct gbak the problem in gone!!! By the way... How can seek that index? I did a metadata search with FlameRobin, but it returned nothing... Thanks again! -s --- Fabiano fabianoaspro@... wrote: Analyze

[firebird-support] Re: something changes after backup restore

2012-08-15 Thread Sergio
Hello Dmitry! First of all: THANKS FOR YOR ANSWER! S C:\Archivos de programa\Firebird\Firebird_2_5\bin\gbak S D:\DATABASE.fdb DATABASE.fbk -user sysdba -password newpassword -Limbo -v -y log.txt do your applications use 2pc transactions? No... as a matter of fact I use quite the same

[firebird-support] execute statement

2012-08-09 Thread Sergio
Hello! I'm trying to do a trigger to maintain a history table. I'm using (for the first time!) execute statement. What I want to do is very simple: if a field change I save the old value in the history When I execute the trigger I get an error: Invalid token. Dynamic SQL Error. SQL error code

[firebird-support] Re: execute statement

2012-08-09 Thread Sergio
EXECUTE STATEMENT is for executing queries only, your code is not just a query as it contains an IF statement. I think for your purposes you need to use EXECUTE BLOCK http://www.firebirdsql.org/file/documentation/reference_manuals/reference_material/html/langrefupd25-execblock.html Thanks

[firebird-support] Re: database in external USB HDD

2012-07-04 Thread Sergio
Helen Borrie in which she says that is not a good idea... But can't find that post now! :( Thanks again! sergio

[firebird-support] Re: database in external USB HDD

2012-07-04 Thread Sergio
? Sergio

[firebird-support] database in external USB HDD

2012-07-02 Thread Sergio H. Gonzalez
Hello there! I use FB 2.5. Is there any known problem with having the database file in an external USB drive conected to the server? Just in case (don't know if it matters!) I always use superserver mode. thanks!! -sergio [Non-text portions of this message have been removed]

[firebird-support] in list as a parameter...

2012-05-22 Thread Sergio
send the list as a parameter, wich other method would you recomend? thanks! Sergio

[firebird-support] The data is not displayed correctly using UTF8

2012-02-23 Thread Sergio Garcia
pk_prueba PRIMARY KEY (id_pais), CONSTRAINT uc_prueba_nombre UNIQUE (nombre) ); Did affects the type of collate used in the domain DOM_NOMBRE? Best regards, Sergio [Non-text portions of this message have been removed]

[firebird-support] setting a generator inside a SP

2012-02-17 Thread Sergio H. Gonzalez
Hello! In the FB guide reads: Setting a generator directly to a certain value (“Update”) PSQL GEN_ID(GeneratorName,NewValue - GEN_ID(GeneratorName, 0 ) ); Warning This is more of a dirty little trick to do what you normally cannot and should not do in

[firebird-support] not null and index usage

2012-02-13 Thread Sergio H. Gonzalez
for the future? Is the any better way of having all records with not null IDs? Thanks! -sergio [Non-text portions of this message have been removed]

[firebird-support] Re: selecting between dates with timestamps fields

2012-02-03 Thread Sergio
I'm trying with (to get all records from Feb 2nd) where (MyTimeStamp between '02-01-2012 00:00:00' and '02-01-2012 23:59:59') it uses the index, but I don't get all the records My mistake!... that seems to work OK... Now I just wonder if that is the *best* way to do that... So far I

[firebird-support] Re: when an index is needed ?

2012-01-31 Thread Sergio
--- Leyne, Sean Sean@... wrote: Consider, A table with every person in the world: - it also not have an index for Country (China + India = 25% of database) Hi! ...but in that case, wouldn't you have a FK to the country table? Do you mean that in such case we should avoid the use of the index

[firebird-support] gbak connection string

2012-01-30 Thread Sergio H. Gonzalez
(FB 2.5) Hello! is there any problem in using gbak with this string: gbak c:\myfolder\mydatabse.fdb [etc...] while there are other PCs connected to the same databse with tcp/ip: servername:c:\myfolder\mydatabse.fdb ??? If I remember well, mixing string connections could damage the database?

[firebird-support] Re: last record from a table

2012-01-30 Thread Sergio
--- Alexandre Benson Smith iblist@... wrote: I would go for: select first 1 MyDate from MyTable order by ID desc With a descending index on ID of course. Thanks Alexandre! I tried both and your method seems to be better... There's a slight difference in the statics. mine: Reads from disk

[firebird-support] selecting concatenated records

2012-01-16 Thread Sergio H. Gonzalez
how... Thank you very much Sergio. [Non-text portions of this message have been removed]

[firebird-support] Re: selecting concatenated records

2012-01-16 Thread Sergio
If you are using Firebird 2.1 or later, then the easiest way is to use a recursive common table expression. I hope I got it right, but I think you get the idea: with recursive r(id, original_id, hierarchy) as ( select id , original_id , 1 as hierarchy from region

[firebird-support] selecting a field by name (using a var)

2011-11-07 Thread Sergio H. Gonzalez
/* (in_etapa as a field name !!!??? )*/ from pedidos_control where id = :in_id into :out_fecha; suspend; end Thanks!!! -sergio [Non-text portions of this message have been removed]

[firebird-support] Re: selecting a field by name (using a var)

2011-11-07 Thread Sergio
pedidos_control where id = ' || cast( :in_id as varchar(10)); execute statement :loc_sql into :out_fecha; suspend; end It's OK? or it can be improved? Thanks again -sergio

[firebird-support] Re: selecting a field by name (using a var)

2011-11-07 Thread Sergio
Thank you very much Tomasz Frank! I'm selecting by the PK, so I'm prety sure that there always will be just one row!! As allways, the help I receive from this group in invaluable to me!! -s

[firebird-support] Re: delete from table... best way?

2011-09-15 Thread Sergio
Not sure what your use is - but if you have t1.id_t2 defined as a foreign key with cascading deletes, then you can never have a t2.id null and any delete of t1 will cascade and automatically delete the associated records in t2. Thanks for answer! Probably I wasn't clear enough... here's

[firebird-support] Re: UDF

2011-08-24 Thread Sergio
--- Josef Kokeš j.kokes@... wrote: Delphi type Currency is not the same thing as Firebird type DOUBLE PRECISION. Yes! that was the problem! Thank you very much Josef!! -s