Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: Re: asp_databases digest: December 25, 2000


Message #1 by shrij@v... on Tue, 26 Dec 2000 18:01:20 +0530 (IST)
run your query in Access and check the output

also, what is objconn ?, assuming it is a valid connection..



line "objConn2.Open "Select * from tblSpecialties Where PK_fk_UserID 

tblMembers.PK_UserId", objConn"



include tblMembers table in from clause

So the modified query is:

line "objConn2.Open "Select * from tblSpecialties,tblMembers Where tblSpecialties.PK_fk_UserID = tblMembers.PK_UserId", objConn"



Good Luck



Regds

Shreekar Joshi



Subject: Please Help me If you can!

From: "T.L. Jackson" <actionjackson@a...>

Date: Mon, 25 Dec 2000 22:54:48 -0000

X-Message-Number: 2



I'm having problems with my asp page.  What I'm trying to do is I have a

database created on my server which I'm trying to use as a search

database.  When a user comes to the page, I want them to be able to type

in the last name of the doctor they are looking for and then all the

information for all the doctors with that last name comes up.  Right now,

I'm grabbing data from three different tables.  The problem I'm having is

that I'm getting the following error:



----------------------------

THE ERROR:

----------------------------



DonnaJacksonAdults & Adolescents



Microsoft JET Database Engine error '80040e10'



No value given for one or more required parameters.



/doctorsearch2.asp, line 29



-----------------------------



As you can tell, when I put in the last name of Jackson, it is going to

the database and getting the information for Donna Jackson but then it

gives me that error.  Line 29 in the following code is where you see this

line "objConn2.Open "Select * from tblSpecialties Where PK_fk_UserID 

tblMembers.PK_UserId", objConn". The code I'm using is as follows:



-----------------------------

THE CODE:

-----------------------------



<%

Dim objConn1

Dim objConn2

Dim LName

set objConn1 = Server.CreateObject("ADODB.Recordset")

set objConn2 = Server.CreateObject("ADODB.Recordset")

LName = Request.Form("LName")

objConn1.Open "Select * from tblMembers Where LName LIKE '" & LName & "'",

objConn

	Do while NOT objConn1.EOF

		Response.write objConn1("FName") & objConn1("LName")

		Response.write objConn1("AgeRange")

		Response.write objConn1("Email")

		Response.write objConn1("HomePageURL")

	objConn2.Open "Select * from tblSpecialties Where PK_fk_UserID = tblMembers.PK_UserId", objConn

		Do while NOT objConn2.EOF			

			Response.write objConn2("PK_fk_SpecialtyArea")

			objConn2.MoveNext

		Loop	

	objConn2.close

	objConn1.MoveNext

	Loop

objConn1.Close

Set objConn1=nothing



%>



-----------------------------



	Can Somebody please help me?  I don't know what I'm doing wrong.  So,

please show me the light.  Thank you.



T.L.



---

FREE WEB DEVELOPMENT CODE, CONTENT, AND INSIGHTS

IN YOUR INBOX!

Get the latest and best HTML, XML, and JavaScript tips, tools, and 

developments from the experts.  Sign up for one or more of EarthWeb's

FREE IT newsletters at http://www.earthweb.com today!  

---

You are currently subscribed to asp_databases as: $subst('Recip.EmailAddr')

To unsubscribe send a blank email to leave-asp_databases-$subst('Recip.MemberIDChar')@p2p.wrox.com


  Return to Index