Article View: borland.public.cppbuilder.database.ado
Article #320Re: Auto Increment Field in MySQL
From: Steve
Date: Wed, 02 Aug 2006 10:20
Date: Wed, 02 Aug 2006 10:20
22 lines
1532 bytes
1532 bytes
Hi Colin, [ .. ] > This is fine except I have an auto-increment field but anytime > I close my application and reopen it, the auto increment field starts back > from '1'. > > here is my table.... > > CREATE TABLE event ( recid int(9) DEFAULT "0" NOT NULL AUTO_INCREMENT, > eventid tinyint(4), > pcdate datetime NOT NULL default "2000-01-01 [ ... ] Did you have try to put away the DEFAULT to the recid autoincrement variable? Is compatible a default value to a variable that is handled directly by the database engine ? Steve
Technical Details
Message-ID:
<44d07c5d$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<44ab128b$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,623a05051a5eb0ad X-Google-Attributes: gid10698b,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Steve" <sdardari_NOSPAM_@rimini.com> Newsgroups: borland.public.cppbuilder.database.ado References: <44ab128b$1@newsgroups.borland.com> Subject: Re: Auto Increment Field in MySQL Date: Wed, 2 Aug 2006 12:20:06 +0200 Lines: 24 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 X-RFC2646: Format=Flowed; Response NNTP-Posting-Host: 87.18.242.114 Message-ID: <44d07c5d$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1154514013 87.18.242.114 (2 Aug 2006 03:20:13 -0700) Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail