Querying A Table In Access (in over my head-HELP!)

Results 1 to 2 of 2

Thread: Querying A Table In Access (in over my head-HELP!)

  1. #1
    Don Makoviney Guest

    Default Querying A Table In Access (in over my head-HELP!)

    I have dabbled in ASP but have been assigned a project that is way over my head.<BR><BR>I have to create pages that pull some information from a database - and I figured that out using the source code below - and it works fine. But now I also need to just pull specific records that fit one of five departments and then 1 of 5 categories.<BR><BR>For instance a typical query to the database would be something like SELECT * WHERE DEPARTMENT= APPAREL & CATEGORY= MEN. . . .and then it would display the records in the format as coded below. . . .which means that the actual category and department fields won&#039t be shown in the results. . . .but I have that part figured out. . .<BR>I haven&#039t been able to find any good resources on querying like that. . . . .none that I have seen have gotten right to the point and simply confuse me. . . . <BR><BR>Thanks in advance for your help. . . . .<BR><BR>-Don Makoviney<BR><BR>&#060;HTML&#062;<BR>&#060;HEAD&#0 62;<BR>&#060;TITLE&#062;Contact information&#060;/TITLE&#062;<BR>&#060;/HEAD&#062;<BR>&#060;BODY&#062;<BR><BR>&#060;%<BR> Dim objConn<BR> Dim objRec<BR><BR> Set objConn = Server.CreateObject ("ADODB.Connection")<BR> Set objRec = Server.CreateObject ("ADODB.Recordset")<BR><BR> objConn.Open "DSN=Contact"<BR><BR> objRec.Open "Contact", objConn, 0, 1, 2<BR><BR> While Not objRec.EOF<BR> Response.Write("&#060;table border=1&#062;")<BR> Response.Write("&#060;tr&#062;")<BR> Response.Write(" &#060;td width=300&#062;" & objRec("Name") & "&#060;/td&#062;")<BR> Response.Write(" &#060;td width=300&#062;" & objRec("Phone") & "&#060;/td&#062;")<BR> Response.Write("&#060;/tr&#062;")<BR> Response.Write("&#060;tr&#062;")<BR> Response.Write(" &#060;td width=600 colspan=2&#062;" & objRec("Description") & "&#060;/td&#062;")<BR> Response.Write("&#060;/tr&#062;")<BR> objRec.MoveNext<BR> Wend<BR>Response.Write("&#060;/table&#062;")<BR> objRec.Close<BR> objConn.Close<BR> Set objRec = Nothing<BR> Set objConn = Nothing<BR><BR>%&#062;<BR><BR>&#060;/BODY&#062;<BR>&#060;/HTML&#062;

  2. #2
    Join Date
    Dec 1969
    Posts
    1,388

    Default RE: Querying A Table In Access (in over my head-HE

    See my reply in the main Q&A

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •