Problem in Reterving numeric Data from oracle 8i through adodb.connection in vb 6.0

V

vikas

I am using Oracle 8 I and Vb 6 and connection to oracle by DSN.
************* Code **************
This is my code:
Public con As New ADODB.Connection
Public myrs As Recordset

con.Open "eFarm", "scott", "tiger"

***************function *************

Function upfarm(ByRef frm1 As Form, ByRef cmb1 As ComboBox, ByRef txt1 As TextBox)
' function for filling group name in combo box'
Dim nm As String
cmb1.Clear
Set myrs = con.Execute("select count(*) from farm")
max1 = myrs(0)
MsgBox (max1)
If max1 > 0 Then
Set myrs = con.Execute("select Farm_ID,farm_name from farm")
MsgBox (myrs(0))
nm = myrs(1)
gcode1 = myrs(0)
MsgBox ("nm = " & nm & " gcode= " & gcode1)
Do Until myrs.EOF
cmb1.AddItem (myrs(1))
cmb1.ItemData(cmb1.NewIndex) = myrs(0)
cmb1.Text = myrs(0)
'frm1.gpcode.Text = pgpcode
myrs.MoveNext
Loop
myrs.MoveFirst
Else
cmb1.Text = "Empty"
End If
End Function

***********end function *****************

When i trying to retrive data from oracle i am able to get only the character type data while in numberic data i am only getting
0 no orginal value.

Please solve the problem and tell me what to do, what can be done.

Thanks in advance

Vikas
 
C

Cor Ligthert

Vikas,

This is a VBNet newsgroup not a VB classic newsgroup.

There are a lot VB classic newsgroup. However because that is still the
activest one I advise you to ask your question in

microsoft.public.vb.general.discussion

You can as well try it in the newsgroup

microsoft.public.data.ado

Not that you are not welcome here, however in those newsgroup are persons
who active use the same languages as you.

Cor
 
H

Herfried K. Wagner [MVP]

I am using Oracle 8 I and Vb 6 and connection to oracle by DSN.

Notice that this is a VB.NET language group. For VB6 + database questions,
consider posting to one of the groups in the
microsoft.public.vb.database[.*] hierarchy.
 
Top