Private Sub arbordrevise(ByVal arbnr As Integer) Dim mySelectQuery As String = "SELECT * FROM arb_ordre WHERE Arb_ordreID = '" & arbnr & "'" Dim connstr2 As String = "Database=hms;Data Source=localhost;User Id=root;Password=root" Dim myConnection As New MySqlConnection(connstr2) Dim myCommand As New MySqlCommand(mySelectQuery, myConnection) myConnection.Open() Dim myReader As MySqlDataReader myReader = myCommand.ExecuteReader() ' Always call Read before accessing data. While myReader.Read() Beskrivelse.Text = myReader.GetString(2) ' HOW TO CHECK NULL VALUE ????? ' If IsDBNull(myReader.GetString(3)) Then 'Merke.Text = "" 'Else 'Merke.Text = myReader.GetString(3) 'End If Merke.Text = myReader.GetString(3) Regnummer.Text = myReader.GetString(4) Motornummer.Text = myReader.GetString(5) Deres_referanse.Text = myReader.GetString(11) tekst.Text = myReader.GetString(13) Plassering.Text = myReader.GetString(17) RegistrertDato.Text = myReader.GetString(7) levering.Text = myReader.GetString(16) start.Text = myReader.GetString(18) tidsforbruk.Text = myReader.GetInt32(19) End While ' always call Close when done reading. myReader.Close() ' Close the connection when done with it. myConnection.Close() End Sub
Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.
Connect with Certified Experts to gain insight and support on specific technology challenges including:
We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE