473,666 Members | 2,412 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to fetch records from 2 tables

140 New Member
hi all,

Tables: story, shot
story-fieldnames, project, date episode
shot-fieldnames, scene,shot, filename(imagep ath),action and dialogue.

Form has field from both the tables. how do i fetch the record from these two tables and display it.

form name-tracker. where it has all the field form both the tables.

how to fetch records from both the tables

help me
Feb 6 '07 #1
4 2250
Killer42
8,435 Recognized Expert Expert
Tables: story, shot
story-fieldnames, project, date episode
shot-fieldnames, scene,shot, filename(imagep ath),action and dialogue.
Form has field from both the tables. how do i fetch the record from these two tables and display it.
form name-tracker. where it has all the field form both the tables.
how to fetch records from both the tables
Is this in VB? If so, what version?

If it's an Access form, you'd be better off posting this question in the Access forum.
Feb 6 '07 #2
indhu
140 New Member
Is this in VB? If so, what version?

If it's an Access form, you'd be better off posting this question in the Access forum.

No
vb6.0 enterprise edition.
Feb 6 '07 #3
Killer42
8,435 Recognized Expert Expert
No
vb6.0 enterprise edition.
Ok.

How far have you got with the coding? For instance, have you done any code to set up a database connection, and that sort of thing?
Feb 6 '07 #4
indhu
140 New Member
Ok.

How far have you got with the coding? For instance, have you done any code to set up a database connection, and that sort of thing?
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Load()
  2.  
  3. Set CON = New ADODB.Connection
  4. CON.CursorLocation = adUseClient
  5.  
  6. CON.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data source=" & App.Path & "\storyboard.mdb;"
  7.  
  8. CON.Open
  9.  
  10.  
  11. Call rLOAD
  12.  
  13. Do While Not storyboard.EOF
  14. scene_txt.AddItem storyboard!scene  'List all the sceneNo items into the ComboBox
  15. storyboard.MoveNext
  16. Loop
  17.  
  18.  
  19. ' Close  Recordset
  20. storyboard.close
  21.  
  22. ' Clear the memory
  23. Set storyboard = Nothing
  24.  
  25. End Sub
myconnection module

Expand|Select|Wrap|Line Numbers
  1. Public CON As ADODB.Connection
  2.  
  3. Public Sub myconnection()
  4. Set CON = New ADODB.Connection
  5.     CON.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\storyboard.mdb;Persist Security Info=False"
  6. End Sub
Feb 6 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

8
4322
by: tom | last post by:
I am new to SQL administration. >From a list of IDs that are the primary key in one table (i.e. Customer Table), I want to make changes in tables that use those IDs as a foreign key. Basically I want to say: If fk_ID is in list then do these statements to that record
10
2795
by: DaveDiego | last post by:
I've had a user delete one of the client records, I do have a version of the DB with all records intact before the deletion occured. Whats the best approach to getting all the related records in each of the tables? I have about 12 tables to put data back into and multiple records for each. Would I need to make an append or update query for each table?
7
2416
by: PC Datasheet | last post by:
Looking for suggestions ---- A database was designed for a national automobile inspection program. In it's simplest form, the database has two tables: TblOwner OwnerID <Year/Make/Model owned by owner, Owner name/address, etc) TblInspection InspectionID
11
3665
by: shriil | last post by:
Hi I have this database that calculates and stores the incentive amount earned by employees of a particular department. Each record is entered by entering the Date, Shift (morn, eve, or night) and the 'employee name'. There is another table which assigns an ID to the Shifts, i.e. 1,2 and 3 for morn, eve & night shifts respectively. From the mother table, the incentive is calculated datewise for each employee as per his shift duty. In...
4
2677
by: mclueless | last post by:
I am working with VB6 and Access. There is a SQL query I have written to retrieve a few records. But when I try to display these records in a listbox, only the first one is fetched, others are not. What should I do to fetch all?? Call Connection Set inv = New ADODB.Recordset inv.Open "SELECT * FROM Invoice_Trans WHERE Inv_No=" & Val(txtInvNo.Text) & "", con, 3, 3 lstSrno.AddItem (inv!SrNo) lstProd.AddItem...
3
3905
by: camarun20 | last post by:
Hi , I constructed an MS access query in java to retrieve the rows in random. The code snipet Connection con = DriverManager.getConnection( database ,"",""); Statement s = con.createStatement() strQry = "select top 10 S_No , Rnd(S_No) as exp from Questions order by Rnd(S_No) desc" ; s.execute(strQry) ;
0
4312
by: padmaneha | last post by:
Hi Thanks for your response but the query which you gave in my previous post doesnt work. It displays the same cnt for movie reviews and videoreviews Let me explain you in detail As I said I have got two tables like one is 'Food table' and the other one is the 'Videos' table Columns which I have created in 'Food' table are 'foodid' and 'blogcid' colcumns which I have created in Videos table are 'videoid, 'destid', 'videotitle'
3
27506
Soniad
by: Soniad | last post by:
Hello, In stored procedure, i am using query that fetches 2 columns record but single row. i have used cursor to fetch single record. is there any way to fetch the record and put it in variable declared without using cursor , or any syntax . As cursor is better to fetch multiple records, but here record fetched is single row record, but the problem i am facing is how to put this value in variable. if there was a single column then it is...
1
3215
by: BinaryBird | last post by:
Hi, i have a small script to display records from two tables. Table 1 keeps track of teams and table 2 keeps track of the members. <?php $dl = mysql_connect ("localhost","nitin_nick","test1234"); $db = mysql_select_db("nitin_registration",$dl); echo "<table border='0' width='986' align='center' cellspacing='1' cellpadding='5'>"; echo "<tr>"; echo "<th>Team Name</th>";
0
8440
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8352
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8780
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8636
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6189
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4192
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4358
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2005
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1763
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.