|
 |
asp_databases thread: What does it means? (Command text was not set for the command object)
Message #1 by "Lan Chi Tran" <lanchi1975@y...> on Thu, 26 Jul 2001 21:26:22
|
|
Dear Expert,
Why does it display this error??? Thanks in advance.
*************************
Microsoft OLE DB Provider for ODBC Drivers error '80040e0c'
Command text was not set for the command object.
The line is: Set rstemp=objConn.execute(SQLstr)
*************************
***************************
Create_Entries.asp
**************************
<%
Dim objConn, myDSN, SQL, rstemp
myDSN="DSN=testdata;UID=sa"
set objConn=server.createobject("adodb.connection")
objConn.open myDSN
SQL="Select * from STANDARDS"
set rstemp=objConn.execute(SQL)
%>
<table border=1 CELLPADDING='2' BGCOLOR='#D5D0DF'>
<H3>Please fill out this form.</H3><tr>
<%
for each frmItem in rstemp.fields
Response.write(" <TR><TD><b>")
Response.write(frmItem.name)
Response.write("</b></TD><TD><INPUT TYPE=TEXT name=frmItem")
Response.write(frmItem.name)
Response.write("'></TD></TR>")
next
%>
**************************
response_create_entries.asp
***************************
<%
dim objConn, names, values, SQLstr, rstemp
Set objConn = Server.CreateObject ("ADODB.Connection")
objConn.Open "testdata"
Set rstemp=objConn.execute(SQLstr)
SQLFields = ""
SQLValues = ""
For each frmItem in Request.Form
SQLFields = SQLFields & ", " & intNumItems
SQLValues = SQLValues & ", '" & Request.Form(intNumItems) & "'"
Next
SQLFields = mid(SQLFields, 3)
SQLValues = mid(SQLValues, 3)
SQLstr = "INSERT INTO Standards (" & SQLFields & ") VALUES (" &
values & ")"
objconn.execute(SQLstr)
rstemp.close
set rstemp=nothing
objconn.close
set objconn = nothing
%>
*********************************
Message #2 by "Grant I" <giswim1@a...> on Thu, 26 Jul 2001 22:17:15
|
|
You now have 6 open threads. This is ridiculous. Stop creating new
threads, PLEASE! You need to be patient. It takes a while for people to
read and reply to your posts. Also, as is shown in the confirmation page,
your post WILL NOT SHOW UP FOR A WHILE!! Stop re-posting. Patience is a
virtue...
I understand that you need help, but you are just being overly obnoxious,
and, quite honestly, extremely annoying.
Grant
> Dear Expert,
>
> Why does it display this error??? Thanks in advance.
>
> *************************
> Microsoft OLE DB Provider for ODBC Drivers error '80040e0c'
> Command text was not set for the command object.
> The line is: Set rstemp=objConn.execute(SQLstr)
>
> *************************
>
>
> ***************************
> Create_Entries.asp
> **************************
> <%
> Dim objConn, myDSN, SQL, rstemp
> myDSN="DSN=testdata;UID=sa"
> set objConn=server.createobject("adodb.connection")
> objConn.open myDSN
> SQL="Select * from STANDARDS"
> set rstemp=objConn.execute(SQL)
> %>
> <table border=1 CELLPADDING='2' BGCOLOR='#D5D0DF'>
> <H3>Please fill out this form.</H3><tr>
> <%
> for each frmItem in rstemp.fields
> Response.write(" <TR><TD><b>")
> Response.write(frmItem.name)
> Response.write("</b></TD><TD><INPUT TYPE=TEXT name=frmItem")
> Response.write(frmItem.name)
> Response.write("'></TD></TR>")
> next
> %>
>
> **************************
> response_create_entries.asp
> ***************************
> <%
> dim objConn, names, values, SQLstr, rstemp
> Set objConn = Server.CreateObject ("ADODB.Connection")
> objConn.Open "testdata"
> Set rstemp=objConn.execute(SQLstr)
> SQLFields = ""
> SQLValues = ""
> For each frmItem in Request.Form
> SQLFields = SQLFields & ", " & intNumItems
> SQLValues = SQLValues & ", '" & Request.Form(intNumItems) & "'"
> Next
> SQLFields = mid(SQLFields, 3)
> SQLValues = mid(SQLValues, 3)
> SQLstr = "INSERT INTO Standards (" & SQLFields & ") VALUES (" &
> values & ")"
> objconn.execute(SQLstr)
> rstemp.close
> set rstemp=nothing
> objconn.close
> set objconn = nothing
> %>
> *********************************
|
|
 |