Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting error in executing INNER JOIN access db query .....

Status
Not open for further replies.

MADisonMAN

Programmer
Sep 9, 2002
8
US
It works fine with the my Development PC having Visual Studio 6.0 and Office XP.

But when i executes on the Web Server IIS on Win2K SP3 it gives me error while executing this query.

How can i get out of it...
 
hmmmmm, maybe you could post some code and so we can have a look at it...would make it easier to help you out
 
Dim oConn
Dim oRs
Dim strQuery

' Create ADO Connection Component to connect
' with database

On Error Resume Next
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open "Provider=MSDASQL.1;Persist Security Info=False;Data Source=supportDSN"

' Execute a SQL query and store the results
' within recordset

strQuery = " SELECT product_part.part_serial_number, product_part.Service_tag_no, product_part.product_id, product_part.part_no, part_table.part_description " &
" FROM service_master INNER JOIN (part_table INNER JOIN product_part ON part_table.part_no = product_part.part_no) ON service_master.Service_tag_no = product_part.Service_tag_no " & " WHERE (((product_part.Service_tag_no)='" & Request("text1") & "') AND ((service_master.warranty_expires_on)>" & Date() & ")) "

Set oRs = oConn.Execute(strQuery)

If oRs.EOF = False Then
strPartDesc = oRs("part_description")
strSNo = oRs("part_serial_number") End If

Set RetrieveProdDetails = oRs
oRs.close
oConn.close

If Err.number <> 0 Then
Response.Write &quot;<br><br><br><br><center><b>Internal Error Occured. Please Try Again Later</b></center>&quot;
Response.End
End If
 
try a response.write of strQuery..then copy and paste it into a query analyzer...just first glance all I can see wrong is a couple extra spaces..but its being autowrapped in here so hard to tell. Also what is the exact error message being displayed?
 
It works fine on my PC in testing environment, XP + IIS. But errors on the server just after the following line:

Set oRs = oConn.Execute(strQuery)

it had to be on the first record but it shows EOF=True on the server, and executes fine on my PC.
 
whats the exact error thats occuring...or can you post the url so I can take a look at the error myself?
 
Right now i am not on my Dev PC. But just let me know is there any Access DB Driver issue on the Server w.r.t. Inner Join? Would i check it out by installing Office XP or VS6.0 on the Server?
 
to my knowledge know there isn't...but someone else may have encountered the problem and have a different answer.

sorry couldn't be more help
 
DOuble check that you are using the same version of access on both machines and that your DSN is set up correctly on both machines. If your using a idfferant version of Access you may need to switch which driver your attempting to use.
-Tarwn &quot;The problem with a kludge is eventually you're going to have to back and do it right.&quot; - Programmers Saying (The Wiz Biz - Rick Cook)
&quot;Your a geek!&quot; - My Girlfriends saying
 
Its done. I just reboot the server two times and its happening without major changes to the Server.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top