I usually insert a row into the table and then set var vnextnum = myautonumcolumn in mytable where count = insert.
Also, there is a SYS_Defaults table which contains a column called sys_next. If you get the column_id of the column in question, you could set a variable = to the next number. Set var vtableid = table_id in sys_tables whe table_name = 'mytablename' Set var vcolumnid = column_id in sys_columns whe table_id = .vtableid Set var vnextnum = sys_next in sys_defaults whe column_id = .vcolumnid Dawn -----Original Message----- From: Claudine Robbins [mailto:[EMAIL PROTECTED] Sent: Thursday, November 03, 2005 12:08 PM To: RBG7-L Mailing List Subject: [RBG7-L] - RE: How do I get the value of the next autonum? Ben, SELECT (MAX(autonumber)+1) INTO... Claudine :) > -----Original Message----- > From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Ben Fogt > Sent: Thursday, November 03, 2005 10:59 AM > To: RBG7-L Mailing List > Subject: [RBG7-L] - How do I get the value of the next autonum? > > An easy one. > > It's a CVAL function, right? I can't find it anywhere. > > Thanks, > > Ben
