I am looking for a code which can get the sl.no's from the database into a combo box, when I select the number from Combo box it should display the rest of the contents like, Price, description, Manufacturer.
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
'Specify the datasource
Dim CONNECTION_STRING As String = "Data Source=LOCALHOST;Initial Catalog=DB_NAME; Integrated Security=True"
Dim conn As SqlConnection = New SqlConnection(CONNECTION_STRING)
'Specify the SELECT query
Dim cmd As SqlCommand = New SqlCommand("SELECT ProductName FROM ProductTable", conn)
'Open the Database
Dim sdr As SqlDataReader = cmd.ExecuteReader
'Do the adding through looping
If Not sdr("ProductName").ToString = String.Empty Then product.Items.Add(sdr.Item("ProductName").ToString)
'Close the Database
Thats the code on loading item from databasae to combobox, now figure out with yourself on how to select and display the other info of selected item.
I Developed application in C# with crystal reports and created setup file in third party (Advance) Installer.When i installed my application on client system application is working but ...