D
Drygast
Hi,
I'm having some problems getting my program to work as I would like it to.
This is because i whish to check if the entered number exists in an
accessdatabase, if i doesn't I
would like to call a form where I can enter the number to the database....
the code:
______________
If Not myReader.GetInt32(1).ToString = txtOrdernummer.Text Then
If MessageBox.Show(("Ordern finns inte i databasen!" & vbCrLf & vbCrLf &
"vill du registrera ordern?"), "Hittar ej ordern", MessageBoxButtons.YesNo,
MessageBoxIcon.Exclamation) = DialogResult.Yes Then
Dim oForm2 As Form2
oForm2 = New Form2
oForm2.Show()
oForm2 = Nothing
End If
End If
______________
I realize that this code is not correct, but I don't know what I should
type instead:
If Not myReader.GetInt32(1).ToString = txtOrdernummer.Text Then
It won't work with "if Not myReader.IsDbNull then" either, it must be cause
I don't even get a null answer but as I said:
how do I solve this?
Regards
/Drygast
I'm having some problems getting my program to work as I would like it to.
This is because i whish to check if the entered number exists in an
accessdatabase, if i doesn't I
would like to call a form where I can enter the number to the database....
the code:
______________
If Not myReader.GetInt32(1).ToString = txtOrdernummer.Text Then
If MessageBox.Show(("Ordern finns inte i databasen!" & vbCrLf & vbCrLf &
"vill du registrera ordern?"), "Hittar ej ordern", MessageBoxButtons.YesNo,
MessageBoxIcon.Exclamation) = DialogResult.Yes Then
Dim oForm2 As Form2
oForm2 = New Form2
oForm2.Show()
oForm2 = Nothing
End If
End If
______________
I realize that this code is not correct, but I don't know what I should
type instead:
If Not myReader.GetInt32(1).ToString = txtOrdernummer.Text Then
It won't work with "if Not myReader.IsDbNull then" either, it must be cause
I don't even get a null answer but as I said:
how do I solve this?
Regards
/Drygast