Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning Dreamweaver MX/MX 2004 MX ISBN: 978-0-7645-4404-0; MX 2004 ISBN: 978-0-7645-5524-4
This is the forum to discuss the Wrox book Beginning Dreamweaver MX by Charles E. Brown, Imar Spaanjaars, Todd Marks; ISBN: 9780764544040
Please indicate which version of the book you are using when posting questions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Dreamweaver MX/MX 2004 MX ISBN: 978-0-7645-4404-0; MX 2004 ISBN: 978-0-7645-5524-4 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 7th, 2003, 07:30 PM
Authorized User
 
Join Date: Oct 2003
Location: , , .
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to kwperry
Default Ch 16 buildingBlock.asp Help!

I am becoming very frustrated with this whole building block process...I have tired many time recreated and strating and rereading the chapter over and over agin but still get this error...anybody have a clude what im doing wrong ...cant view it using lieview or Preview ...any help is appriceated here is the code...

<%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%>

<%
var Section__MMColParam = "1";
if (String(Request.QueryString("sectionID")) != "undefined" &&
    String(Request.QueryString("sectionID")) != "") {
  Section__MMColParam = String(Request.QueryString("sectionID"));
}
%>
<%
var Section = Server.CreateObject("ADODB.Recordset");
Section.ActiveConnection = MM_connCSB_STRING;
Section.Source = "SELECT * FROM Sections WHERE ID = "+ Section__MMColParam.replace(/'/g, "''") + "";
Section.CursorType = 0;
Section.CursorLocation = 2;
Section.LockType = 1;
Section.Open();
var Section_numRows = 0;
%>
<%
var SectionID__MMColParam = "1";
if (String(Request.QueryString("sectionID")) != "undefined" &&
    String(Request.QueryString("sectionID")) != "") {
  SectionID__MMColParam = String(Request.QueryString("sectionID"));
}
%>
<%
var SectionID = Server.CreateObject("ADODB.Recordset");
SectionID.ActiveConnection = MM_connCSB_STRING;
SectionID.Source = "SELECT * FROM Sections WHERE ID = "+ SectionID__MMColParam.replace(/'/g, "''") + "";
SectionID.CursorType = 0;
SectionID.CursorLocation = 2;
SectionID.LockType = 1;
SectionID.Open();
var SectionID_numRows = 0;
%>
<head>
<title><%=(Section.Fields.Item("Section_Name").Val ue)%></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="blockStyles.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</head>
<body bgcolor="#999999" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="MM_preloadImages('','<%=(Section.Fields.It em("Top_Rollover").Value)%>')">

<table width="190" border="1" cellspacing="0" cellpadding="0">
  <tr>
    <td width="10" height="190" rowspan="3"><img src="<%=(Section.Item("Left_Graphic").Value)%>" height="<%=(Section.Item("Left_Height").Value)%>" width="<%=(Section.Item("Left_Width").Value)%>" name="" alt=""></td>
    <td width="170" height="10"><a href="<%=(Section.Fields.Item("Link").Value)%>" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Title','','<%=(Section. Fields.Item("Top_Rollover").Value)%>',1)"><img src="images/title.gif" name="Title" width="170" height="10" border="0"></a></td>
    <td width="10" height="190" rowspan="3"><img src="<%=(Section.Item("Right_Graphic").Value)%>" height="<%=(Section.Item("Right_Height").Value)%>" width="<%=(Section.Item("Right_Width").Value)%>" name="" alt=""></td>
  </tr>
  <tr>
    <td height="170"><img name="" src="<%=(Section.Item("Top_Graphic").Value)%>" width="<%=(Section.Item("Top_Width").Value)%>" height="<%=(Section.Item("Top_Height").Value)%>" alt=""></td>
  </tr>
  <tr>
    <td width="170" height="10"><img src="<%=(Section.Item("Bottom_Graphic").Value)%>" height="<%=(Section.Item("Bottom_Height").Value)%> " width="<%=(Section.Item("Bottom_Width").Value)%>" name="" alt=""></td>
  </tr>
</table>
</body>
</html>
<%
Section.Close();
%>
<%
SectionID.Close();
%>
The resason i have two recordsets look at pg 594 it says Section for the name but the code mentions SectionID so I used both I even tried one or the other same result get error below :

Error Type:
Microsoft JScript runtime (0x800A01B6)
Object doesn't support this property or method
/ImprovedCSB/TMP3xogsmex86.asp, line 72


Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)

Page:
GET /ImprovedCSB/TMP3xogsmex86.asp

HELP please


  #2 (permalink)  
Old October 8th, 2003, 04:04 AM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi there,

What line is line 72?? Might help to find the error....



Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
  #3 (permalink)  
Old October 8th, 2003, 12:28 PM
Authorized User
 
Join Date: Oct 2003
Location: , , .
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to kwperry
Default

Sory Line 72 is located here with code below:

  <td width="170" height="10"><a href="<%=(Section.Fields.Item("Link").Value)%>" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Title','','<%=(Section. Fields.Item("Top_Rollover").Value)%>',1)"><img src="images/title.gif" name="Title" width="170" height="10" border="0"></a></td>


  #4 (permalink)  
Old October 8th, 2003, 01:53 PM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

I could be wrong, but you're using two ways to get to your recordset:

Section.Fields.Item("Link").Value

and

Section.Item("Top_Graphic").Value

An ADO recordset does not have a Item property, but the Fields collection does. So, the first line would work, but the second won't

Could it be that the error message is misleading when it comes to the number of the line the error occurs on, and the error actually takes place in the lines with the Section.Item code??

HtH,

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
  #5 (permalink)  
Old October 8th, 2003, 10:49 PM
Authorized User
 
Join Date: Oct 2003
Location: , , .
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to kwperry
Default

Ok I cleaned my code now I get this error! Running WinXp Pro

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0xd08 Thread 0xe5c DBC 0x1093fd4 Jet'.
/MediaCSBII/TMP5gn2mh13j.asp, line 5

Here is the code for buildingBlock.asp

<%
var Section = Server.CreateObject("ADODB.Recordset");
Section.ActiveConnection = MM_MediaEdge_STRING;
Section.Source = "SELECT * FROM Sections WHERE ID = "+ Section__MMColParam.replace(/'/g, "''") + "";
Section.CursorType = 0;
Section.CursorLocation = 2;
Section.LockType = 1;
Section.Open();
var Section_numRows = 0;
%>
Help Please get sick of this...Im sure all of you can relate

Thanks

Kevin

  #6 (permalink)  
Old October 9th, 2003, 01:16 AM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi Kevin,

Well, to help yourself speed things up, try Google once in a while:

Searching for 0x80004005 ADO "'Temporary (volatile)" results in around 36 hits, indicating this error usually occurs when the web server does not have the correct permissions. You may find the following FAQ useful:

http://www.iisfaq.com/default.aspx?View=A396


Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
  #7 (permalink)  
Old October 10th, 2003, 10:34 AM
Authorized User
 
Join Date: Oct 2003
Location: , , .
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to kwperry
Default

Funny Imar I never thought of that before bothering a lot of people on this board! Yea all 36 links from google suck esp the link you referenced...I thought other web developers out their might've ran into this problem before and how they solved it..I get the same error on two different computers both running WinXP Pro..

If its permissions not sure why that would be and if its the wrong DSN or connection string why can I view the data from the database in dreamweaver?

Anywho I was hoping a member might share his experinces...

  #8 (permalink)  
Old October 10th, 2003, 10:36 AM
Authorized User
 
Join Date: Oct 2003
Location: , , .
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to kwperry
Default

But thanks anyway for your help Imar..it is appriecated!

  #9 (permalink)  
Old October 10th, 2003, 10:49 AM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

If you view the database from within Dreamweaver, your account is used for access to the database. So, if you're logged in as kwperry, kwperry needs access to the .mdb file. Apparently, that is the case.

If you view your web site in a browser, the pages are served through IIS, which, by default, runs under the IUSR_MachineName account, as described in the TheSoccerSite section of the book. At run-time, the IUSR_MachineName account needs the appropriate permissions for both the database (the .mdb file) as the folder it resides in. It needs access to the .mdb file for the obvious reasons (INSERT, DELETE etc), but it also needs access to the folder to store temp files that are created when you open the database.

What security settings do you have on your database and folder? Is the IUSR_MachineName account listed??

Cheers,

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
  #10 (permalink)  
Old October 10th, 2003, 11:11 AM
Authorized User
 
Join Date: Oct 2003
Location: , , .
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to kwperry
Default

I think you are on track the IIS 5.1 uses the account IUSR_CS-Sales01 (machinename) but I logged in on this computer as kperry. So your saying I need to add USER kperry to view/ access the asp page...geez oh man! I think we are on track let me try that! Yes the IUSR_Sales01 has full read.view,write,etc to the folder! Should I add kperry as a user?

 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Try it out:Ch 16 Dataset Example flhartley VB.NET 2002/2003 Basics 1 August 28th, 2009 07:00 AM
Ch 16 Try It Out doesn' t work + Fixes VictorVictor BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 3 December 12th, 2007 10:04 AM
Trouble viewing the forum (ch. 16) Draconian BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 3 August 26th, 2005 02:02 AM
Ch 16 -- compile error w/ components adidaswood BOOK: Beginning ASP.NET 1.0 0 September 22nd, 2004 08:57 PM
Ch 16 driver not found dmswdev JSP Basics 1 June 27th, 2003 05:15 AM



All times are GMT -4. The time now is 02:09 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.