views:

809

answers:

2

Connection Code:

set conx = Server.CreateObject("ADODB.connection")
conx.Open Application("connectionString")

set cmdx = server.CreateObject("ADODB.command")
cmdx.ActiveConnection = conx
cmdx.CommandText = "dbo.sproc"
cmdx.CommandType = &H0004

set rsx = Server.CreateObject("ADODB.Recordset")
rsx.open cmdx

resarray = rsx.getrows

This connection string works:

connectionString = "DRIVER=SQL Server;UID=User;Address=000.000.000.000;Network=DBMSSOCN;DATABASE=Database;SERVER=server;Password=password;"

This doesn't...

connectionString = "Provider=SQLOLEDB;Data Source=000.000.000.000;UID=User;Address=000.000.000.000;Network=DBMSSOCN;DATABASE=Database;SERVER=server;Password=password;"

The error I get is:

ADODB.Recordset error '800a0e78'

Operation is not allowed when the object is closed.

What am I missing?

A: 

Sounds like a permissions problem in the database!

xoxo
It's the same database, just a different way of reaching it.
DeletedAccount
+3  A: 

Just a punt here, but the way OLEDB drivers handle Row count informationals differs from ODBC.

I very much suspect that if you add SET NOCOUNT ON at the top of the Stored Procedure the problem will go away.

AnthonyWJones
That worked a treat, thanks!
DeletedAccount