Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Beginning VB 6
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 4th, 2008, 05:09 AM
Authorized User
 
Join Date: Jul 2006
Location: dera ismail khan, nwfp, Pakistan.
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to naveed77 Send a message via Yahoo to naveed77
Default 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
Reply With Quote
  #2 (permalink)  
Old February 4th, 2008, 05:39 PM
Friend of Wrox
 
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

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.
Reply With Quote
  #3 (permalink)  
Old February 12th, 2008, 06:47 AM
Authorized User
 
Join Date: Jul 2006
Location: dera ismail khan, nwfp, Pakistan.
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to naveed77 Send a message via Yahoo to naveed77
Default

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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
database related query dkvaseeta Pro VB Databases 2 February 22nd, 2007 10:59 AM
Database Query Question kbuska BOOK: Beginning ASP 3.0 4 September 23rd, 2004 11:04 PM
Problem with my database query jmurrayhead Classic ASP Databases 2 March 12th, 2004 03:48 AM
Database access from java, INSERT query problem nitusincog BOOK: Beginning Java 2 1 July 21st, 2003 10:26 AM
database query Darren JSP Basics 0 July 12th, 2003 03:57 PM



All times are GMT -4. The time now is 01:07 PM.


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