Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Mark Denham — — source: Informix-list mailing list archive (1991-1998)
Jack,
}
}
} Hello,
}
} Is there a solution to retrieve the SERIAL number after an INSERT
} in a STORED PROCEDURE as far as the SQLCA.SQLERRD[2] does not works.
}
} Is there a better solution than this one :
}
} set lock mode ...
} lock table in share mode
} insert into zob ( num ) values ( 0 ) <------ num : serial
} select max(num) into var from zob
} commit work
As of 5.1 you can use dbinfo.
^^^^^^^^^^^^^^^^^^^^^^^^^
I think you mean 7.1 don't you?
}INSERT ......
}LET ser = dbinfo("sqlca.sqlerrd1")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
In version 5.03 if you try this you get error -674, procedure not found.
Mark Denham
BBC
London, UK
Mark.Denham@bbc.co.uk
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.