p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Beginning VB 6 (http://p2p.wrox.com/forumdisplay.php?f=75)
-   -   database query problem (http://p2p.wrox.com/showthread.php?t=65688)

naveed77 February 4th, 2008 05:09 AM

database query problem
 
dear friends,

i m using a database of two tables related wid each other by one to many relationship. i want to save and retrieve da data from dese two tables. e.g

t1 is table whose primary key is working as foriegn key in t2 table.
primary key is NIC. on the basis of dis field i want to save da data in table t2, and also want to retrieve it in the similar fashion.

but i dont know wat will be the right query to save and retrieve da data, i am using ADO and access database.
please solve the problem thnq

BrianWren February 4th, 2008 05:39 PM

What do you mean you want to "save the data in table 2?"
You want to insert data into table 2?
If that is the case, you can, with a recordset, use the .Add method, then set each field to the value for the new record, setting the field that erlates back to table 1 to the value for NIC of the record you want to relate to.

naveed77 February 12th, 2008 06:47 AM

dear friend, i could not understand it, i want to store da data in the both table using one query under save button and retrieve as well from both tables using one query. plz tell me right query

thanq in advance


All times are GMT -4. The time now is 11:04 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.