|
 |
asp_databases thread: Microsoft VBScript runtime error '800a01f4'
Message #1 by fione0212@h... on Fri, 20 Jul 2001 20:29:57
|
|
hi
I have been having this error Microsoft VBScript runtime error '800a01f4'
whenever I test my page. I don't understand why, it does that...
But it know it has something to do with an ado constant adcmdtext
here is the initial error
Microsoft VBScript runtime error '800a01f4'
Variable is undefined: 'adCmdText'
/orgchart1/DeleteEmp.asp, line 23
And here is the file...
<%
option explicit
Response.Buffer = True
%>
<!-- #include file="ADOFunctions_inc.asp" -->
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<LINK rel="stylesheet" type="text/css" href="orgchart1.css">
<BODY>
<%
Dim objCommand
Dim varEmpno
varEmpno = Request.QueryString("empno")
set objCommand = Server.CreateObject("ADODB.Command")
set objCommand.ActiveConnection = GetDBConnection()
With objCommand
.CommandText = "{call emp_Delete(?)}"
.CommandType = adCmdText
.Parameters(0).Value = varEmpno
.Execute()
End With
set objCommand = Nothing
Response.Write "Thank you, your information has been deleted."
%>
<P>
Click <A href="default.asp"> here </A> to return to home page.
</BODY>
</HTML>
Thanks much!!
Message #2 by TL Jackson <actionjackson@a...> on Fri, 20 Jul 2001 17:31:43 -0400
|
|
Sound like you forgot to "dim" your adCmdText variable in your DeletEmp.asp
page. So, just "dim" your variable and it should work.
T.L.
At 08:29 PM 7/20/2001 +0000, you wrote:
>hi
>
>I have been having this error Microsoft VBScript runtime error '800a01f4'
>whenever I test my page. I don't understand why, it does that...
>But it know it has something to do with an ado constant adcmdtext
>
>here is the initial error
>
>Microsoft VBScript runtime error '800a01f4'
>
>Variable is undefined: 'adCmdText'
>
>/orgchart1/DeleteEmp.asp, line 23
>
>
>And here is the file...
>
>
><%
>option explicit
>Response.Buffer =3D True
>%>
><!-- #include file=3D"ADOFunctions_inc.asp" -->
><% Dim objCommand Dim varEmpno varEmpno =3D Request.QueryString("empno")
set
>objCommand =3D Server.CreateObject("ADODB.Command") set
>objCommand.ActiveConnection =3D GetDBConnection() With objCommand
>.CommandText =3D "{call emp_Delete(?)}" .CommandType =3D adCmdText
>.Parameters(0).Value =3D varEmpno .Execute() End With set objCommand =3D
>Nothing Response.Write "Thank you, your information has been deleted." %>
>
>Click <default.htm>here to return to home page.
>
>Thanks much!!
>
>
Message #3 by "Fione Ho" <fione0212@h...> on Fri, 20 Jul 2001 16:07:25 -0700
|
|
Even if I dim my variable adCmdText it still creates the same problem.
and we can't dim adCmdText either because it's ADO 's constant not variable
the variable is objCommand
>From: TL Jackson <actionjackson@a...>
>Reply-To: "ASP Databases" <asp_databases@p...>
>To: "ASP Databases" <asp_databases@p...>
>Subject: [asp_databases] Re: Microsoft VBScript runtime error '800a01f4'
>Date: Fri, 20 Jul 2001 17:31:43 -0400
>
>Sound like you forgot to "dim" your adCmdText variable in your DeletEmp.asp
>page. So, just "dim" your variable and it should work.
>
>T.L.
>
>
>At 08:29 PM 7/20/2001 +0000, you wrote:
>>hi
>>
>>I have been having this error Microsoft VBScript runtime error '800a01f4'
>>whenever I test my page. I don't understand why, it does that...
>>But it know it has something to do with an ado constant adcmdtext
>>
>>here is the initial error
>>
>>Microsoft VBScript runtime error '800a01f4'
>>
>>Variable is undefined: 'adCmdText'
>>
>>/orgchart1/DeleteEmp.asp, line 23
>>
>>
>>And here is the file...
>>
>>
>><%
>>option explicit
>>Response.Buffer = True
>>%>
>><!-- #include file="ADOFunctions_inc.asp" -->
>><% Dim objCommand Dim varEmpno varEmpno = Request.QueryString("empno") set
>>objCommand = Server.CreateObject("ADODB.Command") set
>>objCommand.ActiveConnection = GetDBConnection() With objCommand
>>.CommandText = "{call emp_Delete(?)}" .CommandType = adCmdText
>>.Parameters(0).Value = varEmpno .Execute() End With set objCommand =
>>Nothing Response.Write "Thank you, your information has been deleted." %>
>>
>>Click <default.htm>here to return to home page.
>>
>>Thanks much!!
>
Message #4 by "Tomm Matthis" <matthis@b...> on Sat, 21 Jul 2001 11:34:57 -0400
|
|
You need to set a reference to the ADO constants file so vbscript will know
what the constant adCmdText refers to.
-- Tomm
> -----Original Message-----
> From: fione0212@h... [mailto:fione0212@h...]
> Sent: Friday, July 20, 2001 8:30 PM
> To: ASP Databases
> Subject: [asp_databases] Microsoft VBScript runtime error '800a01f4'
>
>
> hi
>
> I have been having this error Microsoft VBScript runtime error '800a01f4'
> whenever I test my page. I don't understand why, it does that...
> But it know it has something to do with an ado constant adcmdtext
>
> here is the initial error
>
> Microsoft VBScript runtime error '800a01f4'
>
> Variable is undefined: 'adCmdText'
>
> /orgchart1/DeleteEmp.asp, line 23
>
>
Message #5 by fione0212@h... on Fri, 27 Jul 2001 19:46:02
|
|
HELP HELP HELP HELP HELP
Dear Users,
For those who are really familar with database, please give me a hand. I
have been trying to figure this problem out for quite a long time, I still
cannot find out the answer why there is this error. Anyways, please take a
look at the error:
Update Employee Details
Microsoft VBScript runtime error '800a01f4'
Variable is undefined: 'adCmdText'
/orgchart1/EditEmp_HND.asp, line 24
When I first post a message about this, a guy respond to me that it seemed
like my variable adCmdText have not declared. I actually went to declared
that 'adCmdText' the problem did not solved, because obviously adCmdText
is not a variable, it's a CommandTypeEnum in ADO constant. In another word
it's a command type standard constant. The book define as indicates that
the provider should evaluate CommandText as textual definiation of a
command, such as a SQL statement.
I'm not sure what those means, can any one tell me?
Every other parts work just fine but only that part always gives an error.
Thanks in advance.
Regards,
Vicky
here is the code..
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE> Employees Details </TITLE>
</HEAD>
<BODY>
<LINK rel="stylesheet" type="text/css" href="orgchart1.css">
<CENTER><H2>Employee Details</h2></center>
<%
Dim objConnection
Dim objCommand
Dim objRSCrw_employees
Dim varEmpno
Dim varEname_last
Dim varEname_first
Dim varPhone
Dim varLocation
Dim varTitle
Dim varExpertise
Dim varJob_Description
On Error Resume Next
Set objConnection = GetDBConnection()
If Request.QueryString("empno") = "" Then
varEmpno = 0
Else
varEmpno=Request.QueryString("empno")
Set objCommand = Server.CreateObject("ADODB.Command")
Set objCommand.ActiveConnection = objConnection
adCmdText= 2
With objCommand
.CommandText = "{call emp_GetData(?, ?, ?, ?, ?, ?, ?, ?)}"
.CommandType = adCmdText
.Parameters(0).Value = varEmpno
.Execute()
varEname_last = .Parameters(1)
varEname_first = .Parameters(2)
varPhone = .Parameters(3)
varLocation = .Parameters(4)
varTitle = .Parameters(5)
varExpertise = .Parameters(6)
varJob_Description = .Parameters(7)
End With
End if
Set objRSCrw_employees = objConnection.Execute( _
"SELECT empno, Ename_last
FROM crw_employees ORDER BY desc")
set objCommand = Nothing
set objConnection = Nothing
%>
<form action="EditEmp_HND.asp?empno=<%= varEmpno %>" Method="post">
<table>
<tr>
<td>Employee No:</td>
<td><input name="varEmpno" value="<%= varEmpno %
>"></td>
</tr>
<tr>
<td>Last name:</td>
<td><input name="varEname_last" value="<%=
varEname_last %>"></td>
</tr>
<tr>
<td>First name:</td>
<td><input name="varEname_first" value="<%=
varEname_first %>"></td>
</tr>
<tr>
<td>Phone:</td>
<td><input name="varPhone" value="<%= varPhone %
>"></td>
</tr>
<tr>
<td>Location:</td>
<td><input name="varLocation" value="<%=
varLocation %>"></td>
</tr>
<tr>
<td>Title:</td>
<td><input name="varTitle" value="<%= varTitle %
>"></td>
<tr>
<tr>
<td>Expertise:</td>
<td><input name="varExpertise" value="<%=
varExpertise%>"></td>
</tr>
<tr>
<td>Job Description:</td>
<td><textarea name="varJob_Description"><%=
varJob_Description %></textarea></td>
<tr>
<tr>
<td></td>
<td>
<input type="submit" value="Save">
<input type="reset" value="Reset">
<input type="button" value="Cancel"
onclick="document.location.href='default.asp';">
</td>
</tr>
</table>
</form>
</BODY>
</HTML>
Message #6 by "Ken Schaefer" <ken@a...> on Sat, 28 Jul 2001 16:43:41 +1000
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: <fione0212@h...>
Subject: [asp_databases] Microsoft VBScript runtime error '800a01f4'
: HELP HELP HELP HELP HELP
: Dear Users,
:
: For those who are really familar with database, please give me a hand. I
: have been trying to figure this problem out for quite a long time, I still
: cannot find out the answer why there is this error. Anyways, please take a
: look at the error:
:
:
: Update Employee Details
: Microsoft VBScript runtime error '800a01f4'
:
: Variable is undefined: 'adCmdText'
:
: /orgchart1/EditEmp_HND.asp, line 24
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
www.adopenstatic.com/faq/800a0bb9step2.asp
Cheers
Ken
Message #7 by "Grant I" <giswim1@a...> on Mon, 30 Jul 2001 16:40:11
|
|
You didn't include ADOVBS.inc. Put this line in around the beginning of
your page (before any database-related code):
<!-- #include adovbs.inc -->
HTH
Grant
> HELP HELP HELP HELP HELP
> Dear Users,
>
> For those who are really familar with database, please give me a hand. I
> have been trying to figure this problem out for quite a long time, I
still
> cannot find out the answer why there is this error. Anyways, please take
a
> look at the error:
>
>
> Update Employee Details
> Microsoft VBScript runtime error '800a01f4'
>
> Variable is undefined: 'adCmdText'
>
> /orgchart1/EditEmp_HND.asp, line 24
>
>
> When I first post a message about this, a guy respond to me that it
seemed
> like my variable adCmdText have not declared. I actually went to
declared
> that 'adCmdText' the problem did not solved, because obviously adCmdText
> is not a variable, it's a CommandTypeEnum in ADO constant. In another
word
> it's a command type standard constant. The book define as indicates that
> the provider should evaluate CommandText as textual definiation of a
> command, such as a SQL statement.
> I'm not sure what those means, can any one tell me?
>
> Every other parts work just fine but only that part always gives an
error.
>
> Thanks in advance.
>
> Regards,
> Vicky
>
> here is the code..
>
> <HTML>
> <HEAD>
> <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
> <TITLE> Employees Details </TITLE>
> </HEAD>
> <BODY>
> <LINK rel="stylesheet" type="text/css" href="orgchart1.css">
> <CENTER><H2>Employee Details</h2></center>
> <%
> Dim objConnection
> Dim objCommand
> Dim objRSCrw_employees
>
> Dim varEmpno
> Dim varEname_last
> Dim varEname_first
> Dim varPhone
> Dim varLocation
> Dim varTitle
> Dim varExpertise
> Dim varJob_Description
>
>
>
> On Error Resume Next
> Set objConnection = GetDBConnection()
>
> If Request.QueryString("empno") = "" Then
> varEmpno = 0
> Else
> varEmpno=Request.QueryString("empno")
> Set objCommand = Server.CreateObject("ADODB.Command")
> Set objCommand.ActiveConnection = objConnection
> adCmdText= 2
> With objCommand
> .CommandText = "{call emp_GetData(?, ?, ?, ?, ?, ?, ?, ?)}"
> .CommandType = adCmdText
> .Parameters(0).Value = varEmpno
> .Execute()
>
> varEname_last = .Parameters(1)
> varEname_first = .Parameters(2)
> varPhone = .Parameters(3)
> varLocation = .Parameters(4)
> varTitle = .Parameters(5)
> varExpertise = .Parameters(6)
> varJob_Description = .Parameters(7)
> End With
> End if
>
> Set objRSCrw_employees = objConnection.Execute( _
> "SELECT empno, Ename_last
> FROM crw_employees ORDER BY desc")
> set objCommand = Nothing
> set objConnection = Nothing
>
> %>
> <form action="EditEmp_HND.asp?empno=<%= varEmpno %>" Method="post">
> <table>
> <tr>
> <td>Employee No:</td>
> <td><input name="varEmpno" value="<%= varEmpno %
> >"></td>
> </tr>
> <tr>
> <td>Last name:</td>
> <td><input name="varEname_last" value="<%=
> varEname_last %>"></td>
> </tr>
> <tr>
> <td>First name:</td>
> <td><input name="varEname_first" value="<%=
> varEname_first %>"></td>
> </tr>
> <tr>
> <td>Phone:</td>
> <td><input name="varPhone" value="<%= varPhone %
> >"></td>
> </tr>
> <tr>
> <td>Location:</td>
> <td><input name="varLocation" value="<%=
> varLocation %>"></td>
> </tr>
> <tr>
> <td>Title:</td>
> <td><input name="varTitle" value="<%= varTitle %
> >"></td>
> <tr>
> <tr>
> <td>Expertise:</td>
> <td><input name="varExpertise" value="<%=
> varExpertise%>"></td>
> </tr>
> <tr>
> <td>Job Description:</td>
> <td><textarea name="varJob_Description"><%=
> varJob_Description %></textarea></td>
> <tr>
>
> <tr>
> <td></td>
> <td>
> <input type="submit" value="Save">
> <input type="reset" value="Reset">
> <input type="button" value="Cancel"
> onclick="document.location.href='default.asp';">
> </td>
> </tr>
>
> </table>
> </form>
>
> </BODY>
> </HTML>
>
>
|
|
 |