Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



Reply
Help with a new project - revisited
Old 09-12-2006, 08:53 PM Help with a new project - revisited
Johntech's Avatar
Average Talker

Posts: 24
Trades: 0
I have a project where there is a parts diagram with hot spots on it. When you click on a part on the diagram,a box will pop up with all the information about the part. I believe Chip Johns was helping me with the project in this forum. I have moved the project to another system and it doesn not work on the new system. The original system was on a XP PRO laptop. I have moved it to a W2k system. Now when you click on the hot spot the pop up box displays the following message:




The page cannot be displayed

There is a problem with the page you are trying to reach and it cannot be displayed.Please try the following:
  • <LI id=instructionsText1>Click the Refresh button, or try again later.
  • Open the localhost home page, and then look for links to the information you want.
HTTP 500.100 - Internal Server Error - ASP error
Internet Information Services

Technical Information (for support personnel)
  • Error Type:
    Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
    [Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot open the file '(unknown)'. It is already opened exclusively by another user, or you need permission to view its data.
    /DisplayPart.asp, line 27
  • Browser Type:
    Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
  • Page:
    GET /DisplayPart.asp
  • Time:
    Tuesday, September 12, 2006, 7:45:36 PM
Here is the program listing:

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
' Program name - DisplayPart.asp

' Beginning of ASP code
'Use to make sure ALL variables are dimentioned
Option Explicit
'Set up the Dim statements for your connection and the sql statement
Dim objConnection, objRS, strQuery
Dim strConnection
'Dimention the receiving string
Dim sPart
'sPart is the receiving part number
sPart = Request.QueryString("part")
' change YourDSN to the name you gave the DSN datasource
set objConnection = Server.CreateObject("ADODB.Connection")
'The data source is PARTS as created in the Data Source in the control panel
strConnection = "Data Source=Parts;"
'Open the connection to the database
objConnection.Open strConnection
'Set the connections for the recordset
Set objRS = Server.CreateObject("ADODB.Recordset")
Set objRS.ActiveConnection = objConnection
'Build the SQL statement to access the RecordSet
strQuery = "SELECT * FROM tblPartsList Where PartNo = '" & sPart & "'"
'Run the query
objRS.Open strQuery
'End of ASP code
%>
<!--- Beginning of HTML code --->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Part Information</title>
</head>
<body>
<!--- End of HTML code --->
<%
'Beginning of ASP code
Response.Write "Part No. : "
Response.Write objRS("PartNo")
Response.Write "<br> Discription : "
Response.Write objRS("Description")
Response.Write "<br> Quantity : "
Response.Write objRS("Quantity")
Response.Write "<br> Cabinet Location : "
Response.Write objRS("Location")
Response.Write "<br> Comments : "
Response.Write objRS("Comments")
'End of ASP code
%>
<br><br>
<A href="javascript: self.close ()">Close</A>
<a href="javascript: parent.refresh()"></a>
</body></html>


On the page with the hot spots, here is the HREF that passes the part number to the display program :
HREF=http://localhost/DisplayPart.asp?part=Y280054


Any help would be greatly appreciated!!


john
Johntech is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-13-2006, 06:58 AM Re: Help with a new project - revisited
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
probably the path to the .mdb file is wrong.

is the DSN setup on the server ?
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 09-13-2006, 04:10 PM Re: Help with a new project - revisited
Johntech's Avatar
Average Talker

Posts: 24
Trades: 0
Quote:
Originally Posted by chrishirst View Post
probably the path to the .mdb file is wrong.

is the DSN setup on the server ?
This is running off of a stand-alone system. I tried to set it up just like it was
set up on my laptop which is running XP PRO and works great on it. But I am trying to move it over to a W2K machine with no luck.

When I was working with Chip Johns I tried to document everything as I went. The only thing different, that I can see, is the operating system.
Johntech is offline
Reply With Quote
View Public Profile
 
Old 09-13-2006, 04:20 PM Re: Help with a new project - revisited
Johntech's Avatar
Average Talker

Posts: 24
Trades: 0
Quote:
Originally Posted by chrishirst View Post
probably the path to the .mdb file is wrong.

is the DSN setup on the server ?
I also know that the internal server is working because I can run a small program on the W2K machine that displays the time:

<html>
<head>
<title>Server Time </title>
</head>
<body>
<%
response.write "<p>The server time is now:"
response.write time
response.write "</p>"
%>
</body>
</html>


Being new to ASP makes it harder to understand why things aren't working

John
Johntech is offline
Reply With Quote
View Public Profile
 
Old 09-13-2006, 04:23 PM Re: Help with a new project - revisited
Johntech's Avatar
Average Talker

Posts: 24
Trades: 0
Quote:
Originally Posted by chrishirst View Post
probably the path to the .mdb file is wrong.

is the DSN setup on the server ?
Maybe I shoud somehow hard code the connection to the database??????

Any thoughts on this or directions??

Thanks for your help

John
Johntech is offline
Reply With Quote
View Public Profile
 
Old 09-13-2006, 04:25 PM Re: Help with a new project - revisited
Johntech's Avatar
Average Talker

Posts: 24
Trades: 0
Quote:
Originally Posted by chrishirst View Post
probably the path to the .mdb file is wrong.

is the DSN setup on the server ?
Is there a way to hard code the path to the database ????

Any thoughts or ideas??

John
Johntech is offline
Reply With Quote
View Public Profile
 
Old 09-13-2006, 05:51 PM Re: Help with a new project - revisited
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
using a connection string is less fraught with issues when moving between systems

to hardcode it use;
Code:
strConnection = "Driver= {MicrosoftAccessDriver(*.mdb)};DBQ=C:\webroot\DbName.mdb;"
if the mdb will remain in the same folder relative to the site
Code:
strConnection = "Driver= {MicrosoftAccessDriver(*.mdb)};DBQ=" & server.mappath("/path/DbName.mdb") & ";"
the above are for ODBC.

the preferred method is to use OLEDB

Hardcoded;
Code:
strConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\webroot\DbName.mdb;"
Relative;
Code:
strConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.Mappath("/path/DbName.mdb") & ";"
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 09-13-2006, 06:26 PM Re: Help with a new project - revisited
Johntech's Avatar
Average Talker

Posts: 24
Trades: 0
Hi Chris

There must be something different in the software on the W2K machine. I tried all of the code you mentioned above and I still can't display any data.

From the code I sent in a previous post, directly from the working laptop, everything works up to the point that the popup window displays then that is where the error is displayed in the popup window.

I'm not sure what else to try.

John
Johntech is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Help with a new project - revisited
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.49455 seconds with 12 queries