msodsc.connection.execute does not work anymore

S

Scottsheck

I am executing the following in an .HTML file (not on a web server) using
vbscript:

Set rst = MSODSC.Connection.Execute(strSql)
If (Err.Number <> 0) Then
msgbox "Error."
endif

This code works fine on a computer with Office XP 2002, but gets an "Object
doesn't support this property
or method (Error 438)" with Service Pack 3.
I can't figure out how to get around this.
 
P

Paul - Lydian

What version of OWC does the page use and is this version loaded on both PCs?
 
S

Scottsheck

What is the easiest way to find out what version OWC is installed.

Also, by the way, I'm using the following <Object tag>
<OBJECT id=MSODSC codeBase=file:msowc.cab
classid=CLSID:0002E530-0000-0000-C000-000000000046><PARAM NAME="XMLData"
VALUE='<xml xmlns:a="urn:schemas-microsoft-com:eek:ffice:access">
<a:DataSourceControl>
<a:OWCVersion>9.0.0.6621</a:OWCVersion>
<a:ConnectionString>Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist
Security Info=False;Initial Catalog=ADR;Data Source=SQLF5</a:ConnectionString>
<a:MaxRecords>10000</a:MaxRecords>
<a:GridX>24</a:GridX>
<a:GridY>24</a:GridY>
<a:Datamodel version="0816">
</a:Datamodel>
</a:DataSourceControl>
</xml>'></OBJECT>

Should I be using the GUID of 2E553? I read that somewhere.
 
S

Scottsheck

I just figured out the problem. The classid in the <Object> tag had to be
changed to 0002E553-0000-0000-C000-000000­000046

It was 0002E530-0000-0000-C000-000000­000046
 
P

Paul - Lydian

These are the different class ids for OWC 9, 10 and 11 (in that order):

DataSourceControl Object
CLSID:0002E530-0000-0000-C000-000000000046
CLSID:0002E553-0000-0000-C000-000000000046
CLSID:0002E55B-0000-0000-C000-000000000046

PivotTable Object
CLSID:0002E520-0000-0000-C000-000000000046
CLSID:0002E552-0000-0000-C000-000000000046
CLSID:0002E55A-0000-0000-C000-000000000046

ChartSpace Object
CLSID:0002E500-0000-0000-C000-000000000046
CLSID:0002E556-0000-0000-C000-000000000046
CLSID:0002E55D-0000-0000-C000-000000000046

Spreadsheet Object
CLSID:0002E510-0000-0000-C000-000000000046
CLSID:0002E551-0000-0000-C000-000000000046
CLSID:0002E559-0000-0000-C000-000000000046

- OWC 9 is supplied with Office 2000 and Office XP (optional).
- OWC 10 is supplied with Office XP and Office 2003 (optional).
- OWC 11 is supplied with Office 2003. (If you upgrade Office 2002 to Office
2003 by default OWC 9 will be deinstalled)

You need the particular version of OWC for the class id that you are using,
so OWC 10 alone does not support OWC 9 (but loading OWC 10 alongside OWC 9
and using OWC 9 class ids fixes certain issues).

So, you had switched from using OWC 9 to OWC 10, probably the page had been
edited using Access 2002 and upgraded.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top