Home » Developer & Programmer » Forms » insert record in database (forms6i,winxp)
insert record in database [message #312514] Wed, 09 April 2008 01:57 Go to next message
gemini5
Messages: 16
Registered: April 2008
Junior Member
hi,
i have a problem.need some help here with forms
i have two tables
project(proj_id,name,prepared_by)
proj_id(primary key)
and
proj_dev_cost(billable_rs,days,proj_id)
proj_id(foreign key)

now i have designed a form...it has text fields for all the 3 columns of the project table.Also i have text fields for billable_rs and days columns of second table but no text field for proj_id.now wat i want is...when i enter the proj_id in the project data block text field it shud also get automatically stored in the database under the proj_id column of proj_dev_cost.how would i do this....plz help me
Re: insert record in database [message #312521 is a reply to message #312514] Wed, 09 April 2008 02:29 Go to previous messageGo to next message
Littlefoot
Messages: 20900
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Basically, you don't have to do anything. Forms Builder already has such a functionality and it is called "master-detail relationship". Use Data Block Wizard, follow instructions and create such a relationship (first create master block (based on the 'project' table), and then detail block ('proj_dev_cost')). Forms Builder will do the rest.
Re: insert record in database [message #312530 is a reply to message #312514] Wed, 09 April 2008 02:48 Go to previous messageGo to next message
azamkhan
Messages: 548
Registered: August 2005
Senior Member
Yes my friend Mr. Little Foot is right. In addition to this I think you didnt add the Fk in the Block. Do so and then create the relationship

Regards,
Azam Khan
Re: insert record in database [message #312563 is a reply to message #312514] Wed, 09 April 2008 05:01 Go to previous message
gemini5
Messages: 16
Registered: April 2008
Junior Member
Thanks a lot Sir...it did help...i was able to do exactly wat i wanted... Smile
i truly appreciate your help
Previous Topic: Change ColorScheme
Next Topic: open document in web
Goto Forum:
  


Current Time: Wed Dec 07 16:23:08 CST 2016

Total time taken to generate the page: 0.12142 seconds