Subject Re: autoincrement problem success?
From Ken Mayer <dbase@nospam.goldenstag.net>
Date Wed, 18 Oct 2023 10:21:58 -0700
Newsgroups dbase.getting-started

On 10/18/2023 9:53 AM, Charlie wrote:
> Think I have fixed this.  When I was running the fixit program I didn't have the correct path to the table.  I just ran it with the correct path and instead of getting lw = 6, it did come up with 293.  Thanks so much for the help I received.  Sorry for my stupid~
>

Well, glad you got it. I probably should have said something about the
path to the table in the code I threw at you. Or had it output an error
(or both).

Changing the code to output a result (adding the ? in front of one line)
would have returned an error code:

set procedure to :dUFLP:DBF7File.CC
oDBF7File = new DBF7File( "your_table_name.dbf" ) // be sure to include
the extension
? oDBF7File.SetNextAutoIncValue( new_value )  // this is the number I
told you to write down
oDBF7File = null
close procedure :dUFLP:DBF7File.cc


A "1" means "DBF not found" ... all this is in the header comments of
the DBF7File.cc file in the dUFLP as well. ;)

Ken

--
*Ken Mayer*
Ken's dBASE Page: http://www.goldenstag.net/dbase
The dUFLP: http://www.goldenstag.net/dbase/index.htm#duflp
dBASE Books: http://www.goldenstag.net/dbase/Books/dBASEBooks.htm
dBASE Tutorial: http://www.goldenstag.net/dbase/Tutorial/00_Preface.htm
dBASE Web Tutorial: http://www.goldenstag.net/dbase/WebTutorial/00_Menu.htm
dBASE DOS to Windows Tutorial:
http://www.goldenstag.net/dbase/DtoWTutorial/00_Menu.htm