August 7th, 2001, 11:01 AM
Creating autonumbers in postgres
Does anyone know how to create an autonumber in postgres? I have two primary keys and one of which is supposed to be a autonumber. I have ported this db over from access and I have cold fusion insert and update forms that work with the access version. I have one of the forms for one of my tables that has 1 primary key, that is not a autonumber, working in postgres but the table with the 2 keys, one of which is autonumber, keeps giving me this message: ODBC Error Code = S1000 (General error)
Error while executing the query; ERROR: ExecAppend: Fail to add null value in not null attribute order_id. When I was getting this error that field was not even on the form in because I assumed it was being generated, I realized it was passing a null value and added it to the form so the user has to input it, but now i am getting that little grey box that says illegal operation program will shut down. Does anyone know how to fix this or at least how to create an autonumber because thats all I can think of?
August 15th, 2001, 08:38 PM
Try making the datatype SERIAL!
August 17th, 2001, 03:31 AM
Re: Creating autonumbers in postgres