Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - How to find record from MS Access using ASP
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to find record from MS Access using ASP

 Post Reply Post Reply
Author
tamakuwala View Drop Down
Newbie
Newbie


Joined: 03 April 2006
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote tamakuwala Quote  Post ReplyReply Direct Link To This Post Topic: How to find record from MS Access using ASP
    Posted: 16 May 2006 at 1:48pm
Hello,
 
I am trying to find data from my database. In my database, I have made up auto generate ID which will increment whenever data will insert from XHTML form. But now what I want to do is that if any use write ID in search field , that data should come up on the screen and user can modify it and save again to database.
I have written a query as well but nothing working properly.
If any one know any website or having these kind of code , please upload it asap...Cry
 
Back to Top
Scotty32 View Drop Down
Moderator Group
Moderator Group


Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
Post Options Post Options   Thanks (0) Thanks(0)   Quote Scotty32 Quote  Post ReplyReply Direct Link To This Post Posted: 12 June 2006 at 12:25pm
if you want to get the details of a record just do


Dim intRecordID

intRecordID = Request.QueryString("ID")
if isNumeric(intRecordID) then intRecordID = clng(intRecordID) else intRecordID = 0

strSQL = "SELECT * FROM Table_Name WHERE ID = " & intRecordID & ";"
rsCommon.Open strSQL, adoCon
if rsCommon.EOF or rsCommon.BOF then
     Response.Write("record not found, Try again")
else
     Response.Write("Record Found, Display Info")
end if
rsCommon.Close



this will display a record where the ID matchs the ID in the database
to display a different record your page address would look like:
page_name.asp?id=1

change the parts in red to suit your needs
S2H.co.uk - WebWiz Mods and Skins

For support on my mods + skins, please use my forum.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.