deepak.krishnan
In the zone
Hello friends,
I am working on my project which makes use of VB as the front end and Oracle as its back-end. My oracle database consists of 2 coloumns named topic and des. This topic must appear in a listbox and when we click a topic the description should appear in a textbox in the form named txtcontent.
(The connection and recordset have been declared in a module)
The codings are as given below:
Dim item As String
Private Sub Command1_Click()
Unload Me
End Sub
Private Sub Form_Load()
con.Open "Provider=MSDAORA;user id=scott;password=tiger;"
rs2.Open "elearn", con, adOpenDynamic, adLockOptimistic
Set lstcom.DataSource = rs2
lstcom.DataField = "topic"
Dim n As Integer
n = rs2.RecordCount
Do While Not (rs2.EOF)
lstcom.AddItem rs2.Fields("topic").Value
rs2.MoveNext
Loop
lstcom.ToolTipText = "Click the topic to view the related information"
End Sub
Private Sub imgexit_Click()
frmintro.Show
Unload Me
End Sub
Private Sub imggal_Click()
frmgal.Show
Unload Me
End Sub
Private Sub imgnb_Click()
frmnb.Show
End Sub
Private Sub imgnet_Click()
frminet.Show
Unload Me
End Sub
Private Sub lstcom_GotFocus()
item = lstcom.Text
Dim rs3 As New ADODB.Recordset
rs3.CursorType = adOpenDynamic
rs3.LockType = adLockOptimistic
rs3.Open "Select des from elearn where topic=item", con, adOpenDynamic, adLockOptimistic
Set txtcontent.DataSource = rs3
txtcontent.DataField = des
End Sub
But when I run this app., I get a error saying that coloumn does not exist and highlights this part of the code:
rs3.Open "Select des from elearn where topic=item", con, adOpenDynamic, adLockOptimistic
So Please help me as soon as possible. It is very urgent!!!
I am working on my project which makes use of VB as the front end and Oracle as its back-end. My oracle database consists of 2 coloumns named topic and des. This topic must appear in a listbox and when we click a topic the description should appear in a textbox in the form named txtcontent.
(The connection and recordset have been declared in a module)
The codings are as given below:
Dim item As String
Private Sub Command1_Click()
Unload Me
End Sub
Private Sub Form_Load()
con.Open "Provider=MSDAORA;user id=scott;password=tiger;"
rs2.Open "elearn", con, adOpenDynamic, adLockOptimistic
Set lstcom.DataSource = rs2
lstcom.DataField = "topic"
Dim n As Integer
n = rs2.RecordCount
Do While Not (rs2.EOF)
lstcom.AddItem rs2.Fields("topic").Value
rs2.MoveNext
Loop
lstcom.ToolTipText = "Click the topic to view the related information"
End Sub
Private Sub imgexit_Click()
frmintro.Show
Unload Me
End Sub
Private Sub imggal_Click()
frmgal.Show
Unload Me
End Sub
Private Sub imgnb_Click()
frmnb.Show
End Sub
Private Sub imgnet_Click()
frminet.Show
Unload Me
End Sub
Private Sub lstcom_GotFocus()
item = lstcom.Text
Dim rs3 As New ADODB.Recordset
rs3.CursorType = adOpenDynamic
rs3.LockType = adLockOptimistic
rs3.Open "Select des from elearn where topic=item", con, adOpenDynamic, adLockOptimistic
Set txtcontent.DataSource = rs3
txtcontent.DataField = des
End Sub
But when I run this app., I get a error saying that coloumn does not exist and highlights this part of the code:
rs3.Open "Select des from elearn where topic=item", con, adOpenDynamic, adLockOptimistic
So Please help me as soon as possible. It is very urgent!!!