[thelist] Command text was not set for the command object.

Paul Backhouse paul.backhouse at 2cs.com
Fri Nov 30 08:59:23 CST 2001


Optimizer - now i always use a config file for that stuff, didn't put it in
because i assumed people would realise the connection done ealier.

cheers

paul

-----Original Message-----
From: thelist-admin at lists.evolt.org
[mailto:thelist-admin at lists.evolt.org]On Behalf Of The Optimizer
Sent: 30 November 2001 14:46
To: thelist at lists.evolt.org
Subject: RE: [thelist] Command text was not set for the command object.


Paul

[..]

I may have missed something, but you don't appear to have set a value for
strConn. This would be necessary to specify which database to connect to.

HTH

Chris Marsh

> -----------------------------------------------------------
> The error im getting is:
>
> Microsoft OLE DB Provider for ODBC Drivers error '80040e0c'
>
> Command text was not set for the command object.
>
> /work/knightsbridge/registered/Results.asp, line 82
> --------------------------------------------------------
> The code im using is:
> -----------------------------------------------------------
> <%
> SearchType = request.form("SearchType")
> SearchType2 = request.querystring("SearchType2")
> SChoice = request.querystring("SChoice")
>
> -- general other ElseIfs above this line of code --
>
> ElseIF SearchType = "strength" Then
> 	If SChoice > "" Then
> 	ThisOne = "= "& SChoice &""
> 	Else
> 	ThisOne = "> '""""'"
> 	End If
> Archive = "0"
> ThisStart = "SELECT * FROM tblData WHERE (Strength "& ThisOne &") AND
> (Archive = "& Archive &") ORDER BY idate DESC"
>
> 	Const adUseClient = 3
> 	Const adOpenKeyset = 1
> 	Const adLockReadOnly = 1
>
> 	Set objConn = Server.CreateObject("ADODB.Connection")
> 	objConn.open strConn
>
> If SurSearch > "" Then
> 	strQuery = "SELECT * FROM tblData WHERE Surname LIKE '%" &
> SurSearch & "%'
> ORDER BY Surname ASC"
> Else
> 	strQuery = ""& ThisStart &""
> End If
> 	'response.write strQuery'
> 	Set objRS = objConn.Execute(strQuery)
> %>
>
> is this confusing or do you get it - does anyone know how to fix the error
> im getting?
>
> cheers
>
> paul
>
>
> ---------------------------------------
> For unsubscribe and other options, including
> the Tip Harvester and archive of TheList go to:
> http://lists.evolt.org Workers of the Web, evolt !
>


---------------------------------------
For unsubscribe and other options, including
the Tip Harvester and archive of TheList go to:
http://lists.evolt.org Workers of the Web, evolt !





More information about the thelist mailing list