ADODB.Command creation problems

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,
I am trying to create an instance of the ADODB.Command object using
javascript on one of my webpages.

var oCon;
var oCmd

oCon = new ActiveXObject("ADODB.Connection");
oCmd = new ActiveXObject("ADODB.Command");

The oCon creates succesfully, the oCmd returns an unable to create object
error.

For info, I have MDAC 2.7 installed.

Thanks for any help.
 
maybe you need to create an instance that is provider-specific?
(OLEDB/Sql Server/etc.)
 
Already do with the line:

oCon.ConnectionString="PROVIDER=SQLOLEDB; Data Source=<myserver>;
UID=<myid>; Password=<mypassword>; Initial Catalog=DS32_IRL";
 
The connection has been established before attempting to create this object.
 

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

Back
Top