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
---
Posted using Wimdows.net NntpNews Component -
Post Made from http://www.DotNetJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching.