I am currently confused and not sure why. I believe I have stared at this for to long. I am currently just trying to populate a ComboBox with the data that is read in from a SQL DB through a SQL query. Currently I have the below code. I am confused as to why I would get the error, " conversion from string "cname" to type 'Integer' is not valid.
Private Sub QuoteInfo_Load(sender As Object, e As EventArgs) Handles MyBase.Load 'Loads the Existing customers names in the Customer Dropdown Mysqlconn = New SqlConnection Mysqlconn.ConnectionString = "Server=RTIRAKLAP\SQLEXPRESS;database=GriseDB;Trusted_Connection=yes;" Dim READER As SqlDataReader Try MysqlConn.open() Dim Query As String Query = "Select * FROM qcust" Command = New SqlCommand(Query, Mysqlconn) 'LEFT OFF SOMETHING WRONG WTIH GETSTRING OR GETTEXTREADER READER = Command.ExecuteReader() While READER.Read = True Dim cName As String = READER.GetString("cname") cmbCustomer.Items.Add(cName) End While MysqlConn.Close() Catch ex As SystemException MessageBox.Show(ex.Message) Finally Mysqlconn.Dispose() End Try End Sub