Variable uses Automation Type not supported in Visual Basic 
Author Message
 Variable uses Automation Type not supported in Visual Basic

Is the error message I am recieving while trying to get the value of a
field in an Oracle 8.17 database with VB6. Here is the connection
string:

"Provider = MSDAORA;Password=fake;User ID=Fake;Data Source = Fake"

The field is an oracle 'number', (the data type, not an object) and I
am trying to apply it to a variable declared as a long (but I get the
same error message with an integer or double). The code IS able to
apply the varchar2 strings to the vb6 strings.

I refuse to believe that Microsoft would issue an Oracle Driver that
does not recognize an Oracle number, so I would like to know what I am
doing wrong!
++++++++++++++++++++++++++++++
Dim StrOracleConn As String
Dim OracleConn As ADODB.Connection
Dim Lister1 As String
Dim rsLister1 As ADODB.Recordset
Dim empid As Long
Dim first As String
Dim last As String
Dim userid As String
Dim supid As Long
empid = 0
StrOracleConn = "Provider=MSDAORA;Password=Var;User ID=Var;Data
Source=Var"
Set OracleConn = New ADODB.Connection
OracleConn.Open StrOracleConn
Lister1 = "select first, last, empid, supid from emp"
Set rsLister1 = New ADODB.Recordset

rsLister1.Open Lister1, OracleConn
While Not rsLister1.EOF
empid = rsLister1("empid")
last = rsLister1("Last")
first = rsLister1("First")
supid = rsLister1("supid")
Debug.Print last
rsLister1.MoveNext
Wend

End Sub

+++++++++++++++++++++++++

Please let me know if you see what I'm doing wrong, or even if you
DON'T see what I'm doing wrong (even negative feedback helps!)

Thanks,
Sara



Wed, 31 Aug 2005 02:42:01 GMT  
 Variable uses Automation Type not supported in Visual Basic

I came across this recently when try to set the cursor location on my
recordset  = aduseclient. Try changing that either to or from
aduseclient. Also, try setting the recordset like

Dim rs as new adodb.recordset
set rs.activeconnection = cnnConnectionObject
rs.open "select somthing from table"

msgbox rs!somthing

--
Posted via http://dbforums.com



Tue, 08 Nov 2005 03:12:43 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Variable uses Automation type not supported in Visual Basic

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

3. Error 458: 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. variable uses an automation type not supported in visual basic

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

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

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

10. 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. ADODB Error: Variable uses an Automation type not supported in Visual Basic

 

 
Powered by phpBB® Forum Software