Attachments in you email is dropped. Try describe you problem with words.
As I answer you on your first time question - use this query to get next ID.
Then supply this ID in your next INSERT query.
select
gen_id(GEN_TABLENAME, 1)
from RDB$DATABASE
Where GEN_TABLENAME - generator for your A.ID column. In this case you not need
to declare you column as IDENTITY.
How can I receive this error when inserting a new row and prior to committing?
May be, 2-nd query starts another transaction (in an unobvious way), while 1-st
transaction still active.
Why do you not upgrade your Firebird and DB to 2.5 version?
select
gen_id(GEN_XXX, 1)
from RDB$DATABASE
Where GEN_XXX - generator for your A.ID column
Try this:
select
A.CODSUB,
A.CODOB,
A.CODSBB,
A.CANT*B.CANT
from LSUBANS A
join X01 B on B.CODSBB = A.CODSUB
Try to determine slowest query:
- "SELECT ... FROM AFDELING A INNER JOIN STAMDATA_PRG_EXT ..."
or
- "select v509Index from VAREFRVSTR_DETAIL ..."
or
- "Insert into VareFrvStr_Detail ..."
Problem can be with indexes - check whether all indexes exists in new DB (after
restore).
Also check
> I never do a database structure change when users are connected and do not
> allow them to use the system at this time. So in my case, it is to slow
It's almost always like that, when you altering DB structure - you must
disconnect all users to avoid problems.
> have you tried altering rdb$indices ?
No, I don't have such necessity.
> Use "ALTER TABLE ... DROP CONSTRAINT ..." and then "ALTER TABLE ... ADD
> CONSTRAINT ... FOREIGN KEY ..."
>
> Thats no fast if the table is huge. This method I know.
I think, "slow" here is not a problem - you do it only one time, and not on
regular basis.
If you mean that this is slow
Use "ALTER TABLE ... DROP CONSTRAINT ..." and then "ALTER TABLE ... ADD
CONSTRAINT ... FOREIGN KEY ..."
Where you see such FK name as "RDB$FOREIGN60"? It created by you or some DB
management tool? As I know, there is no automatically generated ("system")
FK's. So, you must create them manually
Here is CREATE DATABASE syntax:
http://www.firebirdsql.org/file/documentation/reference_manuals/fblangref25-en/html/fblangref25-ddl-db.html
Try use single quotes:
create database 'localhost:milenio-central.fdb' user 'milenio'
password 'secreto' page_size 16384 default character set utf8
> > This query fails:
> > select * from TABLE1 where FIELD1 like 'абв';
>
>
> The "bug" here is that the message for all string input errors is the
> same. Transliteration of the input argument in the failing query
> would occur as in your third query above if the LIKE argument was
> valid.
Hi, people!
I know, that same bugs was discussed early in bug tracker, although bug not
fixed, I think they not the same.
I got an error executing SELECT query with LIKE predicate in case of UTF8
database,
non-UTF8 connection charset and national characters in LIKE argument without
13 matches
Mail list logo