 |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Dreamweaver (all versions) section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

February 9th, 2007, 04:07 PM
|
|
Authorized User
|
|
Join Date: Jan 2006
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Sorry Imar
Media edge site , and yes the <%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%>
Mike
|
|

February 9th, 2007, 04:14 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Right. I gave you a VB Script example. Maybe this works better??
var MM_mysite_STRING = "Driver=(Microsoft Access Driver*.mdb)};DBQ=" + Server.MapPath("/") + "/TheWatchCompany.mdb;"
(JavaScript uses + for string concatenation, not &)
Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
While typing this post, I was listening to: Geen spijt by Osdorp Posse (Track 6 from the album: Afslag Osdorp) What's This?
|
|

February 9th, 2007, 04:26 PM
|
|
Authorized User
|
|
Join Date: Jan 2006
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Imar
Opening up the index page in the browser this is what I'm now getting
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
/blockNav.asp, line 15
And this is the line it is pointing to in blockNav.asp
Title.ActiveConnection = MM_TheWatchCompany_STRING;
Mike
P.S. guess I'm Not going to get this to work except locally
|
|

February 9th, 2007, 04:47 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Well, that is at least some progress; it means the script successfully parses your connection string.
How does the end result look like?
To see that, add this:
Response.Write(MM_mysite_STRING)
Response.End()
after the code that assigns the connection string.,
Also, try some of the Access connection strings from www.connectionstrings.com Yours seems a bit out dated....
Make sure you modify those strings so they use the MapPath stuff.....
Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
|
|

February 9th, 2007, 04:55 PM
|
|
Authorized User
|
|
Join Date: Jan 2006
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Imar
do i put that at the end of of the script we were talking about earlier
i.e <%
// FileName="Connection_ado_conn_string.htm"
// Type="ADO"
// DesigntimeType="ADO"
// HTTP="true"
// Catalog=""
// Schema=""
var MM_TheWatchCompany_STRING = "Driver=(Microsoft Access Driver*.mdb)};DBQ=" + Server.MapPath("/") + "/TheWatchCompany.mdb;"
Response.Write(MM_TheWatchCompany_STRING)
Response.End()
%>
Mike
|
|

February 9th, 2007, 05:02 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
No, it's exactly right there. This code writes the new value for MM_TheWatchCompany_STRING to the screen and then ends page processing so you can what it says.....
Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
|
|

February 9th, 2007, 05:21 PM
|
|
Authorized User
|
|
Join Date: Jan 2006
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Imar
The error page came with another error, with extra settings in it, which i put in and now its giiving me this but the arrow is pointing to the s in users????
Microsoft JScript compilation error '800a03ff'
Expected hexadecimal digit
/Connections/TheWatchCompany.asp, line 8
var MM_TheWatchCompany_STRING = "Driver=(Microsoft Access Driver*.mdb)};DBQ=\\iis696\domains\o\o-do.co.uk\user\htdocs\TheWatchCompany.mdb;"
-----------------------------------------------------------------------------------------------------------^
|
|

February 9th, 2007, 05:41 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
How did this end up in your connection string??
DBQ=\\iis696\domains\o\....
I thought you were using MapPath??
Confused......
Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
While typing this post, I was listening to: Isobel by Björk (Track 12 from the album: Greatest Hits) What's This?
|
|

February 9th, 2007, 05:43 PM
|
|
Authorized User
|
|
Join Date: Jan 2006
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Imar
when I put this is as you suggesterd
<%
// FileName="Connection_ado_conn_string.htm"
// Type="ADO"
// DesigntimeType="ADO"
// HTTP="true"
// Catalog=""
// Schema=""
var MM_TheWatchCompany_STRING = "Driver=(Microsoft Access Driver*.mdb)};DBQ=" + Server.MapPath("/") + "/TheWatchCompany.mdb;"
Response.Write(MM_TheWatchCompany_STRING)
Response.End()
%>
This is the fault that it brought up....
Driver=(Microsoft Access Driver*.mdb)};DBQ=e:\domains\o\o-do.co.uk\user\htdocs/TheWatchCompany.mdb;
Thats when i altered the line and recieved the fault with the word user above...now I'm totally lost
The front of the site should look something like that of www.twcuk.net but with the iframes as per media edge
Mike
|
|

February 9th, 2007, 05:48 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Sorry about getting you lost.... ;)
The idea of Server.MapPath is that at *run-time* the physical location of the database is determined. Once you have that working, you can leave it in. There's no need to add the actual physical path in the connection string, as MapPath takes care of that at run-time.
I asked you to add the Response.Write and Response.End statements to determine if the correct paths came up. Now, it seems that it does, you can remove them again and hopefully things then work.
If you still want to add the physical location in the connection string (although not recommended), escape each \ with another\:
DBQ=\\\\iis696\\domains\\o\\o-do.co.uk\\user\\htdocs\\TheWatchCompany.mdb;"
Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
While typing this post, I was listening to: D.D. And E. by This Mortal Coil (Track 17 from the album: Blood) What's This?
|
|
 |