PostgreSQL Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesPostgreSQL Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 7th, 2001, 10:01 AM
vio vio is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2001
Posts: 1 vio User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Angry 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?
Thanks

Reply With Quote
  #2  
Old August 15th, 2001, 07:38 PM
esconsult1 esconsult1 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 1999
Location: New York City
Posts: 69 esconsult1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 10
Send a message via AIM to esconsult1
Try making the datatype SERIAL!
__________________
-------------------------
The new search engine in town:
http://www.w3matter.com

Reply With Quote
  #3  
Old August 17th, 2001, 02:31 AM
speyrucq speyrucq is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2001
Posts: 1 speyrucq User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Re: Creating autonumbers in postgres

Quote:
Originally posted by vio
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?
Thanks


Use triggers.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesPostgreSQL Help > Creating autonumbers in postgres


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT