dbTalk Databases Forums  

Foxpro class libarary help

comp.databases.xbase.fox comp.databases.xbase.fox


Discuss Foxpro class libarary help in the comp.databases.xbase.fox forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Firstname Lastname
 
Posts: n/a

Default Foxpro class libarary help - 04-19-2004 , 10:44 AM






Hi
I have installed VFP 6.0 and new to OOPs concept

I have created Form using form designer wizard, Selected the all the
fields from the dbf. Here, by default it adds the buttons(controls) add,
next, top,prev, print,find add,edit etc..

I have fields like customer name, index number, date, place etc... After
runing the form, when I click "Add" button, I can enter the data
manually and save the data by clicking the "Save" button.

Now I want modify this to : When I click "Add" button for first time for
first record, the Index number field should automatically increament to
"001", instead user entering manually on this field. Pls let me the code
and which part of event to add this code.

I'm able to see and understand some extend of the code for this from
through class library but I'm not able to modify as per my requirement.

Thanks in Advance.
-Ashok


Reply With Quote
  #2  
Old   
Eric den Doop
 
Posts: n/a

Default Re: Foxpro class libarary help - 04-19-2004 , 03:01 PM






Hello, Firstname!
You wrote on Mon, 19 Apr 2004 21:14:27 +0530:

FL> Now I want modify this to : When I click "Add" button for first time
FL> for first record, the Index number field should automatically
FL> increament to "001", instead user entering manually on this field. Pls
FL> let me the code and which part of event to add this code.

You're looking for a primary key generator. You can find a sample in the
NewID() stored procedure of the Tastrade sample database that ships with
VFP6.
Since you're new to VFP, I'd like to advise you to install Service Pack 5.
You can download it here:
http://msdn.microsoft.com/vstudio/do...es/sp/vs6/sp5/
--
Eric den Doop
www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP8



Reply With Quote
Reply




Thread Tools
Display Modes

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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.