Reply to this topic  Start new topic
> Createobject Is Not Defined ?
The ToolSmith
post Dec 11 2007, 02:08 PM
Post #1






Posts: 5
Joined: 11-December 07
Member No.: 27,922



I'm trying to make an ADO connection to a DB using the following javascript code code...

CODE

var connection = COM.createObject("ADODB.Connection");

I receive the following error:
uncaught exception: createObject: Access denied: COM

Any idea what might be going on. I'm using the latest widget engine (4.5) on WIndows XP SP2

Thanks,
-Paul
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
BOINCer
post Dec 11 2007, 04:07 PM
Post #2






Posts: 1,288
Joined: 28-September 05
From: Buenos Aires, Argentina
Member No.: 10,111



Since 4.5, you need to specify on the <security> block that you will use a COM object, and what object you will use.




User is offlineProfile CardPM
Go to the top of the page
+Quote Post
The ToolSmith
post Dec 11 2007, 06:41 PM
Post #3






Posts: 5
Joined: 11-December 07
Member No.: 27,922



QUOTE(BOINCer @ Dec 11 2007, 11:07 AM) *

Since 4.5, you need to specify on the <security> block that you will use a COM object, and what object you will use.


I'm using the following in my widget.xml file:

CODE
<security>
    <filesystem>full</filesystem>
    <command>true</command>
    <com name="ADODB.Connection">ADODB.Connection</com>
</security>


I know the name is incorrect, any idea what it is?

Thanks again,
-Paul



User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Lauurent
post Dec 11 2007, 09:27 PM
Post #4






Posts: 210
Joined: 1-February 07
From: London, UK
Member No.: 19,503



QUOTE(The ToolSmith @ Dec 11 2007, 06:41 PM) *
I know the name is incorrect, any idea what it is?


Did you try that?

CODE
<security>
    <filesystem>full</filesystem>
    <command>true</command>
    <com name="ADODB">ADODB</com>
</security>




User is offlineProfile CardPM
Go to the top of the page
+Quote Post
The ToolSmith
post Dec 12 2007, 01:59 PM
Post #5






Posts: 5
Joined: 11-December 07
Member No.: 27,922



QUOTE(Lauurent @ Dec 11 2007, 04:27 PM) *

Did you try that?

CODE
<security>
    <filesystem>full</filesystem>
    <command>true</command>
    <com name="ADODB">ADODB</com>
</security>


Close...I got this to work:

CODE
<security>
    <filesystem>full</filesystem>
    <command>true</command>
    <com name="ADODB">ADODB.Connection</com>
</security>
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
BOINCer
post Dec 12 2007, 02:13 PM
Post #6






Posts: 1,288
Joined: 28-September 05
From: Buenos Aires, Argentina
Member No.: 10,111



QUOTE(The ToolSmith @ Dec 12 2007, 10:59 AM) *
Close...I got this to work:

The 'name' attribute is just for the user to see on the security dialog, so you need to give a descriptive name.




User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Fast Reply  Reply to this topic    Start new topic  
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: