Subject Re: [ib-support] Help! Problem on database..
Author Lucas Franzen
> HI all,
> I have a big problem now...
> I am not able to insert new record in my database,
> I always got this error: 'conversion error from string "314"'
> calling the SP who create the id of the record,
> what is mean? What I can do?
> GFix show now problem on database.
>

> The SP is:
>
> BEGIN
> OID=GEN_ID( OID_GENERATOR, 1 );
> INSERT INTO oid_info VALUES
> ( :OID, :TABELLA, 'NOW', :OID_UTENTE, 0, :USERNAME, :COMPUTER );

1. It's no good idea to do inserts just with VALUES and without
specifying the fieldnames. Normally an insert statement should looik
like:
INSERT INTO TABLE ( TABLE_FIELD1, TABLE_FIELD2, ...)
VALUES ( :NEW_VALUE1, :NEW_VALUE2, ... )
If you add or drop a field from your table your statement would be
invalid....

2. Maybe your conversion error is because of this

3. Conversion error fro string 314 might if oyu try to enter a string
value in for example a date field.

4. What you can do? Drop this silly procedure and rewrite it, using
explicitely Fieldnames and Values.


> SUSPEND;

What do you need suspend for in this procedure?
Suspend is needed when you do select data and want to write the data to
the ouptput.

You're not selecting, you're inserting.
Or are you mixing selects and DML?

Luc.