CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Grid Question

Print topic Send  topic

Author Message
afrausto

Posts: 66
Posted: 09/08/2005, 5:25 PM

Hello,

Can anyone give me some direction with this. I have an editable grid that only allows a user to insert new data into Table A. That's the easy part. The next step is I would like to insert a new record into Table B based on what the user entered into Field1. For example, If TableA:Field1 = "True" , then Insert a new record into TableB and set TableB:SID = TableA:ID. Where ID is the Autonumber created when the new record(s) where inserted into Table A.

Thanks in advance for any suggestions.
View profile  Send private message
Edd


Posts: 547
Posted: 09/09/2005, 4:54 AM

I am assuming you are using a good database (Not MSAccess) and if so all good databases support triggers.

I would suggest that you use a trigger on the table and populate your send table that way.


_________________
Accepting and instigating change are life's challenges.

http://www.syntech.com.au
View profile  Send private message
afrausto

Posts: 66
Posted: 09/09/2005, 8:59 AM

Edd,

I guess I should have stipulated the database I'm using. Unfortunately it's MS Access in this case. Any suggestions, other than swtiching to another database?

Is it possible to loop through the records within After Execute Insert event and then use one of the fields to pull the record ID in Table A and insert only those that meet the criteria? For example, Field2 in TableA must be unique. Couldn't I use this criteria to obtain TableA:ID and then select only those where TableA:Field1 = "True"?

Thanks for your input.
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.