GIDForums  

Go Back   GIDForums > Webmaster Forums > Web Design Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 08-Oct-2005, 04:06
pcxgamer's Avatar
pcxgamer pcxgamer is offline
Senior Member
 
Join Date: Sep 2002
Location: South Carolina, USA
Posts: 1,095
pcxgamer is a jewel in the roughpcxgamer is a jewel in the roughpcxgamer is a jewel in the rough

Need Help with ASP


I have tried search all over the internet but can't seem to find one good how to on searching an Access Database with ASP.

What I need is to be able to use one keyword work and then only pull back the record in the database that has that keyword. I know that this is simple but for the life of me I can't seem to get it right.
__________________
If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization.
  #2  
Old 08-Oct-2005, 09:50
WaltP's Avatar
WaltP WaltP is offline
Outstanding Member
 
Join Date: Feb 2004
Location: Midwest US
Posts: 3,335
WaltP is a name known to allWaltP is a name known to allWaltP is a name known to allWaltP is a name known to allWaltP is a name known to allWaltP is a name known to all

Re: Need Help with ASP


Search for "SQL SELECT" statement.
__________________

During the election they said Obama could only be elected when pigs fly. Well, we currently have an epidemic of Swine Flu. Coincidence?
  #3  
Old 08-Oct-2005, 20:27
admin's Avatar
admin admin is offline
Administrator
 
Join Date: Sep 2002
Posts: 841
admin will become famous soon enough

Re: Need Help with ASP


Do you have example code? And what exactly is the problem, are you having a hard time figuring out the (Access) SQL statement or the ASP code?
__________________
Custom BB codes you can use here:
[HTML] | [C++] | [CSS] | [JAVA] | [PY] | [VB]
  #4  
Old 09-Oct-2005, 04:10
pcxgamer's Avatar
pcxgamer pcxgamer is offline
Senior Member
 
Join Date: Sep 2002
Location: South Carolina, USA
Posts: 1,095
pcxgamer is a jewel in the roughpcxgamer is a jewel in the roughpcxgamer is a jewel in the rough

Re: Need Help with ASP


It the ASP part I'm still looking for some code. I understand the basic behind it I know how to connect to the database and some basic things but I'm not sure of the code needed to tell ASP to take what the user enters then pull only the table that matches that keyword.

I believe that the code should be fairly simple as there is no guess work I know what there going to be looking for.
__________________
If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization.
  #5  
Old 27-Oct-2005, 09:16
pcxgamer's Avatar
pcxgamer pcxgamer is offline
Senior Member
 
Join Date: Sep 2002
Location: South Carolina, USA
Posts: 1,095
pcxgamer is a jewel in the roughpcxgamer is a jewel in the roughpcxgamer is a jewel in the rough

Re: Need Help with ASP


I finially got it down. It was with the SQL statement. I going to post the code could someone go through the code and let me know what you think? I'm still very new to ASP and would maybe like some suggestion or advice.

Code:
<!--- Vendor Log View Version 1.0 This will pull information from the vendor log to view Databases used - vendorlog.mdb Author : Thomas McGinnis This script is for use only by Bi-lo Operations Version 1.0 Modified : never <!-- Start Form Section --> <% 'Dimension variables Dim adoCon 'Holds the Database Connection object Dim rsvendorlog 'Holds the recordset for the records in the database Dim strSQL 'Holds the SQL query to query the database Dim rsJob Session.Contents("vendorlog") = "C:\Inetpub\wwwroot\vendorlog1.mdb" Set rsJob = Request.Form("Jobname") 'Create an ADO connection object Set adoCon = Server.CreateObject("ADODB.Connection") 'Set an active connection to the Connection object using a DSN-less connection adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Session.Contents("vendorlog") 'Create an ADO recordset object Set rsvendorlog = Server.CreateObject("ADODB.Recordset") 'Initialise the strSQL variable with an SQL statement to query the database strSQL = "SELECT Tape_Type, Volser, RunDay, Company, Jobname, Schedule, Process, Opco_contact, Plan, Vendor, Address, City, State, Zip, Vendor_contact_Attn, Phone_number, Return_to_vendor, Shipper, DSN, Label, DENS, IDRC, BLKSIZE, Input_Output FROM VEN82 WHERE Jobname LIKE '%"&rsJob&"%'" 'Open the recordset with the SQL query rsvendorlog.Open strSQL, adoCon 'Loop through the recordset Do While not rsvendorlog.EOF View_Tape_Type = rsvendorlog("Tape_Type").value View_Volser = rsvendorlog("Volser").value View_RunDay = rsvendorlog("RunDay").value View_Company = rsvendorlog("Company").value View_Jobname = rsvendorlog("Jobname").value View_Schedule = rsvendorlog("Schedule").value View_Process = rsvendorlog("Process").value View_Opco_contact = rsvendorlog("Opco_contact").value View_Plan = rsvendorlog("Plan").value View_Vendor = rsvendorlog("Vendor").value View_Address = rsvendorlog("Address").value View_City = rsvendorlog("City").value View_State = rsvendorlog("State").value View_Zip = rsvendorlog("Zip").value View_Vendor_contact_Attn = rsvendorlog("Vendor_contact_Attn").value View_Phone_number = rsvendorlog("Phone_number").value View_Return_to_Vendor = rsvendorlog("Return_to_Vendor").value View_Shipper = rsvendorlog("Shipper").value View_DSN = rsvendorlog("DSN").value View_Label = rsvendorlog("Label").value View_DENS = rsvendorlog("DENS").value View_IDRC = rsvendorlog("IDRC").value View_BLKSIZE = rsvendorlog("BLKSIZE").value View_Input_Output = rsvendorlog("Input_Output").value 'Move to the next record in the recordset rsvendorlog.MoveNext Loop 'Reset server objects rsvendorlog.Close Set rsvendorlog = Nothing Set rsJob = Nothing Set adoCon = Nothing %> <html> <head> <title>Vendor Tape Log</title> </head> <body bgcolor="#99cccc"> <h2>BI-LO Data Center Vendor Tape Log</h2> <form action="vendorview1.asp" method=post> <input type="text" name="jobname" value ="" size="12"> <input type=submit value="Search For Jobname"> </form> <table border=1 width=100%> <tr> <td width=50%> Jobname: <input name=a value="<% =View_Jobname%>" size="20"><br> Company: <input name=b value="<% =View_Company%>" size="20"><br> Volser: <input name=c value="<% =View_Volser%>" size="20"><br> Schedule: <input name=d value="<% =View_Schedule%>" size="20"><br> Day: <input name=e value="<% =View_RunDay%>" size="20"><br> DSN: <input name=f value="<% =View_DSN%>" size="30"><br> </td> <td width=50%> Tape Type: <input name=g value="<% =View_Tape_type%>" size="20"><br> Output/In: <input name=h value="<% =View_Input_Output%>" size="20"><br> IDRC: <input name=i value="<% =View_IDRC%>" size="20"><br> Density: <input name=j value="<% =View_DENS%>" size="20"><br> Block Size: <input name=k value="<% =View_BLKSIZE%>" size="20"><br> Vendor Return Tape: <input name=l value="<% =View_Return_to_vendor%>" size="20"><br> </td> </tr> </table> <table border=1 width=100%> <tr> <td> Process: <textarea cols=25 rows=3 name=m><% =View_Process%></textarea><br> </td> </tr> </table> <table border=1 width=100%> <tr> <td width=50%> OPCO Contact: <input name=n value="<% =View_Opco_contact%>" size="20"><br> Plan: <input name=o value="<% =View_Plan%>" size="20"><br> Vendor: <input name=p value="<% =View_Vendor%>" size="20"><br> Address: <input name=q value="<% =View_Address%>" size="20"><br> City: <input name=r value="<% =View_City%>" size="20"><br> State: <input name=s value="<% =View_State%>" size="20"><br> Zip: <input name=t value="<% =View_Zip%>" size="20"><br> Contact Person / ATTN: <input name=u value="<% =View_Vendor_contact_Attn%>" size="20"><br> Phone Number: <input name=v value="<% =View_Phone_number%>" size="20"><br> Shipper: <input name=w value="<% =View_Shipper%>" size="20"><br> </td> <td width=50%> <input type="button" value="Search" action="vendor_search.html"> <input type="button" value="New Record"> <input type="button" value="Help"><br><br> <input type="button" value="Submit"> <input type="button" value="Reset"> </td> </tr> </table> </body> </html>

Thanks for any advice or suggestion that anyone may have.
__________________
If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization.
 
 

Recent GIDBlogToyota - 2009 May Promotion by Nihal

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 08:58.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.