Variable uses an Automation type not supported in Visual Basic 
Author Message
 Variable uses an Automation type not supported in Visual Basic

I am getting "Variable uses an Automation type not
supported in Visual Basic" Error # 458 when i try to
create an MTS object.

Set mobjExportDoc = CreateObject("dciExportDoc.ExportDoc")

Now this object is an MTS component with "Requires New
Transaction" and in one of the public functions, I am
passing ADOR.Recordset by reference.

Public Function RunExport(objAgent As Object, objDoc As
dciMessage.Document, mrsFields As ADOR.Recordset) As
Boolean

To make it worse, this code works fine on some servers and
does not work on other servers.

If I remove the ADOR.Recordset from parameter of the
function, then there is no error but I defintely need to
pass the ADOR.Recordset.

I have the hunch that it is MDAC related problem.. because
some servers on which it was not working I uninstalled and
re-installed MDAC 2.7   that too 3 times and after that it
started working. But I can not do the same in production
as I dont have the accses rights.  I can only verify the
MDAC Dlls and check any config if it needs to be seen.

I have compared the ADO tree in "c:\program files\common
files\system\ado\" of the servers on which it works and on
servers on which it does not work. And there is no
difference.

Could any one please help me with this problem. I need
help very urgently. Would appreciate your time.



Sun, 11 Dec 2005 05:51:53 GMT  
 Variable uses an Automation type not supported in Visual Basic
Seems like your dciExportDoc is written in C/C++ ?
As the error suggests try declaring the variable as

Dim mobjExportDoc as Object
not as
Dim mobjExportDoc as dciExportDoc.ExportDoc

If you are already using that style (as Object) then let me know, we shall
check other possibilities.

HTH
--
Ashok Gupta - ashi
This posting is provided "AS IS" with no warranties, and confers no rights.

Quote:
> I am getting "Variable uses an Automation type not
> supported in Visual Basic" Error # 458 when i try to
> create an MTS object.

> Set mobjExportDoc = CreateObject("dciExportDoc.ExportDoc")

> Now this object is an MTS component with "Requires New
> Transaction" and in one of the public functions, I am
> passing ADOR.Recordset by reference.

> Public Function RunExport(objAgent As Object, objDoc As
> dciMessage.Document, mrsFields As ADOR.Recordset) As
> Boolean

> To make it worse, this code works fine on some servers and
> does not work on other servers.

> If I remove the ADOR.Recordset from parameter of the
> function, then there is no error but I defintely need to
> pass the ADOR.Recordset.

> I have the hunch that it is MDAC related problem.. because
> some servers on which it was not working I uninstalled and
> re-installed MDAC 2.7   that too 3 times and after that it
> started working. But I can not do the same in production
> as I dont have the accses rights.  I can only verify the
> MDAC Dlls and check any config if it needs to be seen.

> I have compared the ADO tree in "c:\program files\common
> files\system\ado\" of the servers on which it works and on
> servers on which it does not work. And there is no
> difference.

> Could any one please help me with this problem. I need
> help very urgently. Would appreciate your time.



Sun, 11 Dec 2005 16:23:11 GMT  
 Variable uses an Automation type not supported in Visual Basic
Other possibility (if the first thing did not work) :)
Now I must tell you one thing, the ADO files, as you said, could be same (as
looking at the folders) but the proper ADO components are not registered on
those computers. As you might know this already, copying the dlls fdoenst
not mean anything to that computer/application that uses them.

HTH

--
Ashok Gupta - ashi
This posting is provided "AS IS" with no warranties, and confers no rights.

Quote:
> I am getting "Variable uses an Automation type not
> supported in Visual Basic" Error # 458 when i try to
> create an MTS object.

> Set mobjExportDoc = CreateObject("dciExportDoc.ExportDoc")

> Now this object is an MTS component with "Requires New
> Transaction" and in one of the public functions, I am
> passing ADOR.Recordset by reference.

> Public Function RunExport(objAgent As Object, objDoc As
> dciMessage.Document, mrsFields As ADOR.Recordset) As
> Boolean

> To make it worse, this code works fine on some servers and
> does not work on other servers.

> If I remove the ADOR.Recordset from parameter of the
> function, then there is no error but I defintely need to
> pass the ADOR.Recordset.

> I have the hunch that it is MDAC related problem.. because
> some servers on which it was not working I uninstalled and
> re-installed MDAC 2.7   that too 3 times and after that it
> started working. But I can not do the same in production
> as I dont have the accses rights.  I can only verify the
> MDAC Dlls and check any config if it needs to be seen.

> I have compared the ADO tree in "c:\program files\common
> files\system\ado\" of the servers on which it works and on
> servers on which it does not work. And there is no
> difference.

> Could any one please help me with this problem. I need
> help very urgently. Would appreciate your time.



Sun, 11 Dec 2005 16:26:42 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Variable uses an Automation type not supported in Visual Basic

2. Error 458: Variable uses an Automation type not supported in Visual Basic

3. variable uses an automation type not supported in visual basic

4. variable uses an automation type not supported in visual basic

5. variable uses an automation type not supported in visual basic

6. Error when creating dll: variable uses an automation type not supported in visual basic

7. ErrMsg: Variable uses an Automation type not supported in Visual Basic

8. Variable uses an Automation type not supported in Visual Basic

9. Variable uses an Automation type not supported in Visual Basic for ADO recordset

10. ADODB Error: Variable uses an Automation type not supported in Visual Basic

11. Variable uses an Automation type not supported in Visual Basic for ADO recordset

12. variable uses an automation type not supported in visual basic

 

 
Powered by phpBB® Forum Software