[firebird-support] Invalid argument in EXECUTE STATEMENT - cannot convert to string

2014-06-25 Thread Tim Ward t...@telensa.com [firebird-support]
Anyone know what this error message actually means?

Yes I am trying to run an EXECUTE STATEMENT, but it's not clear to me 
what an argument means in this context, or what it is that something 
is trying to convert to a string, or why it's trying to do so, or why it 
can't be done.

 execute statement

 'select first 1 MODULEID, ELEMENTID from TBLMODULE' || 
:tableType || ' ' ||
 'where ELEMENTID = ' ||:ELEMENTID || :userClause || ' 
order by 1 ASC'

 into :nModuleId, :nElementId;

tableType is a varchar
elementid is a bigint
userclause is a varchar

nmoduleid is a bigint
nelementid is a bigint

The only thing I can think of, after struggling for some time to 
understand the message, is that the thing between statement and into 
is the argument, and the only reason I can think of that it might not 
be a string - despite obviously looking like one!! - is that elementId 
is null (neither of the other variables can ever be null). Does that 
make sense?

-- 
Tim Ward



[firebird-support] Error 335544528 in classic mode and multiple users

2014-06-25 Thread kokok_ko...@yahoo.es [firebird-support]
I have a web server suing Firebird. I installed it using Classic mode because 
it seems more robust.
Usually, databases have between 1 to 3 users concurrently as maximum. However, 
there are 50 databases and eventually many users could be using their database.

When I open the database, it works fine. Then, if I open the same database from 
another client , I get ISC ERROR 335544528, shutdown.

Is it related with Classic mode? I understand that Classic mode creates a new 
process for each client, but does it mean that the same database cannot be 
shared by 2 clients?

Thank you

 



RE: [firebird-support] Error 335544528 in classic mode and multiple users

2014-06-25 Thread 'Edward Mendez' emendez...@nc.rr.com [firebird-support]
Could that Database be in single user mode? When you try to connect are you 
using SYSDBA, but your client is using another login.

 

From: firebird-support@yahoogroups.com 
[mailto:firebird-support@yahoogroups.com] 
Sent: Wednesday, June 25, 2014 10:56 AM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Error 335544528 in classic mode and multiple users

 

  

I have a web server suing Firebird. I installed it using Classic mode because 
it seems more robust.
Usually, databases have between 1 to 3 users concurrently as maximum. However, 
there are 50 databases and eventually many users could be using their database.

When I open the database, it works fine. Then, if I open the same database from 
another client , I get ISC ERROR 335544528, shutdown.

Is it related with Classic mode? I understand that Classic mode creates a new 
process for each client, but does it mean that the same database cannot be 
shared by 2 clients?

Thank you

 





RE: [firebird-support] Error 335544528 in classic mode and multiple users

2014-06-25 Thread kokok_ko...@yahoo.es [firebird-support]
The connection is via network, TCP, not single user mode.

Re: [firebird-support] Invalid argument in EXECUTE STATEMENT - cannot convert to string

2014-06-25 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On 25-6-2014 16:08, Tim Ward t...@telensa.com [firebird-support] wrote:
 Anyone know what this error message actually means?

May I suggest that you also include the error in the message body, when 
reading e-mail on a mobile device, long subject lines have a tendency to 
get truncated.

(The error in the title is: Invalid argument in EXECUTE STATEMENT - 
cannot convert to string )

 Yes I am trying to run an EXECUTE STATEMENT, but it's not clear to me
 what an argument means in this context, or what it is that something
 is trying to convert to a string, or why it's trying to do so, or why it
 can't be done.

   execute statement

   'select first 1 MODULEID, ELEMENTID from TBLMODULE' ||
 :tableType || ' ' ||
   'where ELEMENTID = ' ||:ELEMENTID || :userClause || '
 order by 1 ASC'

   into :nModuleId, :nElementId;

 tableType is a varchar
 elementid is a bigint
 userclause is a varchar

 nmoduleid is a bigint
 nelementid is a bigint

 The only thing I can think of, after struggling for some time to
 understand the message, is that the thing between statement and into
 is the argument, and the only reason I can think of that it might not
 be a string - despite obviously looking like one!! - is that elementId
 is null (neither of the other variables can ever be null). Does that
 make sense?

If the statement is NULL, you get an 'unexpected end of command' or an 
'invalid token' instead.

It would probably be easier to know the actual values of :tableType, 
:ELEMENTID and :userClause

Mark
-- 
Mark Rotteveel


Re: [firebird-support] Error 335544528 in classic mode and multiple users

2014-06-25 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On 25-6-2014 16:55, kokok_ko...@yahoo.es [firebird-support] wrote:


 I have a web server suing Firebird. I installed it using Classic mode
 because it seems more robust.
 Usually, databases have between 1 to 3 users concurrently as maximum.
 However, there are 50 databases and eventually many users could be using
 their database.

 When I open the database, it works fine. Then, if I open the same
 database from another client , I get ISC ERROR 335544528, shutdown.

 Is it related with Classic mode? I understand that Classic mode creates
 a new process for each client, but does it mean that the same database
 cannot be shared by 2 clients?

Have you checked if the database is in single user maintenance mode? Use 
gstat to look at the database header

eg it will say:
Attributes  force write, single-user maintenance

If that is the case, you need to bring it back online with gfix:

gfix -user sysdba -password masterkey -o multi TESTDATABASE.FDB

Mark
-- 
Mark Rotteveel


Re: [firebird-support] Error 335544528 in classic mode and multiple users

2014-06-25 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On 25-6-2014 17:48, kokok_ko...@yahoo.es [firebird-support] wrote:
 The connection is via network, TCP, not single user mode.

Connecting through TCP does not preclude single user mode.

Mark
-- 
Mark Rotteveel


Re: [firebird-support] Cannot Insert Filepath into database

2014-06-25 Thread adu...@yahoo.com [firebird-support]
Hey Helen,

Thanks for your help, after two days of work i finally found the error. The 
error message was just wrong, though it says: column count does not match 
value count, it broke because there was one field which was marked as 
readonly. I have no idea why the field is marked readonly, the IBConsole i'm 
using does'nt say so either.

For everybody who may read this thread: column count doesn't match value 
count --- check your columns, write your insert statement with 1 column 
missing and switch it, you may hit a readonly and it inserts.

Thanks :)
Simon

Re: [firebird-support] Error 335544528 in classic mode and multiple users

2014-06-25 Thread kokok_ko...@yahoo.es [firebird-support]
That was the reason. I thought that single mode was only defined in the 
connection, not in the database.

Thank you, you saved my day!

[firebird-support] CrossTab Select

2014-06-25 Thread sremula...@bol.com.br [firebird-support]
Partners'm racking my brain on a SQL code, does anyone could give a force 

I made the following SP

 CREATE PROCEDURE PRODS(
 PAC INTEGER)
 RETURNS(
 HOR TYPE OF HORA,
 SEG TYPE OF DESCRICAO,
 TER TYPE OF DESCRICAO,
 QUA TYPE OF DESCRICAO,
 QUI TYPE OF DESCRICAO,
 SEX TYPE OF DESCRICAO,
 SAB TYPE OF DESCRICAO,
 DOM TYPE OF DESCRICAO)
 AS
 BEGIN
 FOR SELECT HORA, (CASE EXTRACT(WEEKDAY FROM TABELAB.DATAB) when 0 then PRODUTO 
else 0 END), (CASE EXTRACT(WEEKDAY FROM TABELAB.DATAB) when 0 then PRODUTO else 
0 END), (CASE EXTRACT(WEEKDAY FROM TABELAB.DATAB) when 0 then PRODUTO else 0 
END), (CASE EXTRACT(WEEKDAY FROM TABELAB.DATAB) when 0 then PRODUTO else 0 
END), (CASE EXTRACT(WEEKDAY FROM TABELAB.DATAB) when 0 then PRODUTO else 0 
END), (CASE EXTRACT(WEEKDAY FROM TABELAB.DATAB) when 0 then PRODUTO else 0 
END), (CASE EXTRACT(WEEKDAY FROM TABELAB.DATAB) when 0 then PRODUTO else 0 END) 
from TABELAB
 WHERE TABELAB.DATABBETWEEN '23.06.2014' AND '28.06.2014'
 GROUP BY HORA, PRODUTO, DATAB
 
 
 INTO HOR, :DOM, :SEG, :TER, :QUA, :QUI, :SEX, :SAB DO
 SUSPEND; 
 
 END
 
Correct Return
 
 #Código 1
 2
 3
 HORA  SEG   TERQUA   QUI   
   SEX  SAB  DOM
 09:00 CEBOLA  CEBOLA CEBOLACEBOLA  CEBOLA   
CEBOLA  0
 09:10 CEBOLA  0 00 
 00





 
Incorrect Return
 
 #Código 1
 2
 3
 4
 5
 6
 7
 HORA  SEG  TERQUAQUI   
  SEXSAB DOM
 09:00 0 0  0 0 
   0CEBOLA   
 09:00 0 0  0 0 
   CEBOLA00
 09:00 0 0  0 
CEBOLA   000
 09:00 0 0  CEBOLA   0  
  000
 09:00 0 CEBOLA   0 0   
 000
 09:00 CEBOLA0   0 0
000