I have a routine as follows, which helps me to do query governing for a very
large database with free adhoc capability with web front end.
Below routine used to work on all IIS5 machines with Win2000 server with
sp1, MDAC 2.5. Gradually it started not working on certain machines.
The issue is that at
Set rsC = oCmdCost.Execute line I get
********************************
Error Type:
Microsoft OLE DB Provider for SQL Server (0x80004005)
Invalid cursor state
/personSearchus.asp, line 27
********************************
sConnCost=
"server=myServer;uid=sa;pwd=;database=myDb;provider=SQLOLEDB;driver={SQL
Server};Connect Timeout=300;General Timeout=300;"
Set oConnCost = CreateObject(sCn)
oConnCost.Open sConnCost
oConnCost.CursorLocation = 3 :
Set oCmdCost = CreateObject(sCmd): oCmdCost.ActiveConnection = oConnCost
oCmdCost.CommandTimeout = 180 :
oCmdCost.CommandText = "set showplan_all off"
Set rsC = oCmdCost.Execute
oCmdCost.CommandText = "set showplan_all on"
Set rsC = oCmdCost.Execute
sSql = "select distinct top 500 idField from myTable where firstName
='jacko' and state = 'CA' and lastName like = 'K%'
oCmdCost.CommandText = sSql
oCmdCost.CommandType = 1
oCmdCost.prepared = false
Set rsC = oCmdCost.Execute
rsC.movelast
iCostRows = clng(rsC("EstimateRows"))
Heeeeeeeeeelp please.
What is file+version is causing this error.
Travis McGee
Nothing But Microsoft