944,129 Members | Top Members by Rank

Ad:
  • ASP Discussion Thread
  • Unsolved
  • Views: 3890
  • ASP RSS
May 16th, 2007
0

retrive data from different tables of Ms access

Expand Post »
hi
i am designing a database using Ms Access and ASP. i have 3 tables in access namely 'PERSONAL', other as 'POLICY' and 3rd one is named as 'STAFF'. in the contact table i have ID, Name, Children as fields. Also in policy table the firlds are:- ID, date_of_policy, no_policy, amount_paid, amount_balance and similarly the 3rd ie., staff has few fields. all three are linked my a common field which is ID

all i want is when the user searches for a perticular name (from frontend) it should search through table- 'PERSONAL' (fields- Name and Children). once it get the perticular name with the help of the ID it should retrive the datafrom both 'POLICY' and 'STAFF' and display in the front end of ASP.

I know how to search data in the table of database but i m a bit confussed on how to retrive data of that perticular name from different table linking the tables

plz help me its important an urgent.
neha
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
nehashri is offline Offline
21 posts
since Jan 2007
May 16th, 2007
0

Re: retrive data from different tables of Ms access

I don't know ASP, but I do know access and how to use it from VB.

I would create a query which gives me the results I want, ie.e links tables and prompts you for name in name field.

Then I would call that query from VB.

Hope this helps
Reputation Points: 22
Solved Threads: 19
Posting Whiz
DenisOxon is offline Offline
345 posts
since Jan 2007
May 17th, 2007
0

Re: retrive data from different tables of Ms access

thanks for reply
i have created a query that gives me search result but that query works for only in the same table how do i retrive data from other table of same database. my tables are linked in access(relations have been made)
neha
Reputation Points: 10
Solved Threads: 0
Newbie Poster
nehashri is offline Offline
21 posts
since Jan 2007
May 17th, 2007
0

Re: retrive data from different tables of Ms access

If you use the query wizard to build the query then you can add as many linked tables as you wish, with some or all fields from them.

If you have built the query manually, then in the box at top of query definition, you presumably have just one table showing. Right click in space and the click show table. You add tables to query and then fields from that table.
Reputation Points: 22
Solved Threads: 19
Posting Whiz
DenisOxon is offline Offline
345 posts
since Jan 2007
May 17th, 2007
0

Re: retrive data from different tables of Ms access

sQuery="SELECT * FROM personal,policy,staff "_
&"WHERE personal.name="&Request.Form("name")&" "_
&"AND personal.id=policy.id "_
&"AND policy.id=staff.id;"

[connection].execute(sQuery)

I never use VBScript - only J(ava)script in ASP, so syntax maybe not ideal, but you get the idea.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
richfeed is offline Offline
3 posts
since Apr 2007
May 23rd, 2007
0

Re: retrive data from different tables of Ms access

thankyou Denis for ur reply
nut i dont want to use access query or access with vb for my search....i need asp for the same
thank you richfeed your suggestion has given me an idea about how to progress....thankyou i'll let you know the progress
thanks again both of you
Reputation Points: 10
Solved Threads: 0
Newbie Poster
nehashri is offline Offline
21 posts
since Jan 2007
May 23rd, 2007
0

Re: retrive data from different tables of Ms access

thanks
Last edited by nehashri; May 23rd, 2007 at 2:29 am.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
nehashri is offline Offline
21 posts
since Jan 2007
May 23rd, 2007
0

Re: retrive data from different tables of Ms access

Thanks Denis for ur suggestion but i strickly want this to be done in ASP..........

well Richfeed thanks for the help ur code hv given me a way to go ahead....thanks both of u again
i'll let u know the progress
neha
Reputation Points: 10
Solved Threads: 0
Newbie Poster
nehashri is offline Offline
21 posts
since Jan 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP Forum Timeline: retrive data from different tables of Ms access
Next Thread in ASP Forum Timeline: Fetching Form Values with ASP





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC