Hello.
I am not getting the right idea to the oracle table in the list box so can anyone please tell me how can i list the oracle sql plus table's column in the listbox.
Thanks in Advance.
Hello.
I am not getting the right idea to the oracle table in the list box so can anyone please tell me how can i list the oracle sql plus table's column in the listbox.
Thanks in Advance.
Well this can be done one of two ways... The first is to use an ORDER BY statement when you retrieve the records from the oracle table or you can set the sorted property of the listbox to true...
Now, if you need help in retrieving records from an oracle database. Use your friends (yahoo, google, ask, answers, bing) and search for vb6 ado tutorial and see http://www.connectionstrings.com if you want to go with a DNS Less connection...
Good Luck
Hi
Try this code
Private Sub software_prim()
strSQL = "select distinct Primavera from Master_final"
rs.Open strSQL, cn
If Not (rs.EOF And rs.BOF) Then
rs.MoveFirst
Do While Not rs.EOF
primavera = rs.Fields(0).Value
lstsoftware12.AddItem (primavera)
rs.MoveNext
Loop
End If
rs.Close
End Sub
here cn is the connection
rs is the recordsouce
This has definitely worked for me
Hope it works for you to.
Happy Programming
Hi,
"Select * From Tab"
gives list of all the Tables in oracle database..
Regards
Veena
Hi,
"Select * From Tab"
gives list of all the Tables in oracle database..
Regards
Veena
Hi Qveen
I dont think he needs to select all the tables.
He needs the columns of a particular table.
If I am wrong then please do correct me
Thanks
Happy Programming
to get the list of oracle tables use the following
select table_name from user_tables order by table_name
to get the list of columns of a oracle tables use the following
select column_name from user_tab_cols where table_name=upper('table_name') order by column_name
You can use 2 combo boxes one to populate the list of tables and the other for the list of columns of a table.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.