OLE DB Session Object missing - not with SQL Provider
I am trying to display data in an Excel workbook by querying a SQL Server
Quote:
> database via it's OLE db provider.
> I connect to the database this way -
> cn.Provider = "sqloledb" 'The type of connection Provider
> cn.Properties("Data Source").Value = "server"
> cn.Properties("Initial Catalog") = "db"
> cn.Properties("Integrated Security").Value = "SSPI"
> Then I try to return a recordset this way -
> ocmd.ActiveConnection = cn
> ocmd.CommandTimeout = 300
> ocmd.CommandText = sql
> ocmd.CommandType = adCmdText
> Set rs = ocmd.Execute()
> It gives me an error at ocmd.ActiveConnection = cn - saying "Requested
> operation requires an OLE DB Session object, which is not supported by the
> current provider."
> Help!
> Stephanie