Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_beginners thread: I got error 800a000d and I don't know why!


Message #1 by "Jonmaz" <jonmaz@s...> on Mon, 14 May 2001 19:31:40
Hi,



I'm going mad!  I copied the following code out of a tutorial book, and 

kept getting a 800a000d error.  I checked every single damn character, but 

I had typed it correctly!  



<%@ Language = VBScript %>

<% Option Explicit %>

<!--#include file="DatabaseConnect.asp"-->

<!--#include virtual="/adovbs.inc"-->

<html>

<body>

<%

Dim objRS

Set objRS=Server.CreateObject("ADODB.Recordset")

objRS.Open "tblExpenses", objConn, , , adCmdTable

Do While Not objRS.EOF

	Response.Write("<br>Name :" & objRS("EmployeeName"))

	Response.Write(" (" & objRS("EmployeeNumber") & ")<br>")

	Response.Write("Amount requested: " & objRS("ExpenseAmount") 

& "<br>")

	Response.Write "Reason for expense:"

	Response.Write objRS("ExpenseReason")

	

objRS.MoveNext

Loop

		



objRS.Close

Set objRS=Nothing

objConn.Close

Set objConn=Nothing

%>

</body>

</html>







And then - and this is the really weird thing - while more or less 

changing things at random, I broke up the line that was generating the 

error into two, as follows:



Instead of this one line:



Response.Write("<br>Name :" & objRS("EmployeeName"))





I wrote it on two lines, like this:



Response.Write("<br>Name :")

Response.Write( objRS("EmployeeName"))





AND IT WORKED!!!!



Can anybody explain to me what the hell is going on?  I know this 

particular bit of code works now, but I don't understand why.



Much appreciated!
Message #2 by Wei WU <wwu@i...> on Tue, 15 May 2001 09:36:40 +1000
Hi,



objRS.Open "tblExpenses", objConn, , , adCmdTable



If the tblExpenses is a table name, then it's wrong. here should be a SQL

sentense or s stored proc name.



ta



Wei



-----Original Message-----

From: Jonmaz [mailto:jonmaz@s...]

Sent: Tuesday, 15 May 2001 5:32 AM

To: aspx_beginners

Subject: [aspx_beginners] I got error 800a000d and I don't know why!





Hi,



I'm going mad!  I copied the following code out of a tutorial book, and 

kept getting a 800a000d error.  I checked every single damn character, but 

I had typed it correctly!  



<%@ Language = VBScript %>

<% Option Explicit %>

<!--#include file="DatabaseConnect.asp"-->

<!--#include virtual="/adovbs.inc"-->

<html>

<body>

<%

Dim objRS

Set objRS=Server.CreateObject("ADODB.Recordset")

objRS.Open "tblExpenses", objConn, , , adCmdTable

Do While Not objRS.EOF

	Response.Write("<br>Name :" & objRS("EmployeeName"))

	Response.Write(" (" & objRS("EmployeeNumber") & ")<br>")

	Response.Write("Amount requested: " & objRS("ExpenseAmount") 

& "<br>")

	Response.Write "Reason for expense:"

	Response.Write objRS("ExpenseReason")

	

objRS.MoveNext

Loop

		



objRS.Close

Set objRS=Nothing

objConn.Close

Set objConn=Nothing

%>

</body>

</html>







And then - and this is the really weird thing - while more or less 

changing things at random, I broke up the line that was generating the 

error into two, as follows:



Instead of this one line:



Response.Write("<br>Name :" & objRS("EmployeeName"))





I wrote it on two lines, like this:



Response.Write("<br>Name :")

Response.Write( objRS("EmployeeName"))





AND IT WORKED!!!!



Can anybody explain to me what the hell is going on?  I know this 

particular bit of code works now, but I don't understand why.



Much appreciated!


  Return to Index