Click here to Skip to main content
15,886,518 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: vb.net in sql data fetching on dataGridView problem Pin
Mycroft Holmes14-Sep-19 12:44
professionalMycroft Holmes14-Sep-19 12:44 
Questioni want to erase two datatables with a single button please help Pin
Augusto1008-Sep-19 7:35
Augusto1008-Sep-19 7:35 
AnswerRe: i want to erase two datatables with a single button please help Pin
Dave Kreskowiak8-Sep-19 16:59
mveDave Kreskowiak8-Sep-19 16:59 
GeneralRe: i want to erase two datatables with a single button please help Pin
Augusto10010-Sep-19 7:44
Augusto10010-Sep-19 7:44 
GeneralRe: i want to erase two datatables with a single button please help Pin
Dave Kreskowiak10-Sep-19 8:51
mveDave Kreskowiak10-Sep-19 8:51 
GeneralRe: i want to erase two datatables with a single button please help Pin
Augusto10011-Sep-19 4:14
Augusto10011-Sep-19 4:14 
GeneralRe: i want to erase two datatables with a single button please help Pin
Richard MacCutchan11-Sep-19 5:39
mveRichard MacCutchan11-Sep-19 5:39 
GeneralRe: i want to erase two datatables with a single button please help Pin
Richard Deeming11-Sep-19 23:33
mveRichard Deeming11-Sep-19 23:33 
You haven't told us which line of your original post is line 41, but I'm guessing it's one of these:
VB.NET
CodigoInterno = Me.cmbCodigoInternoEDC.Text
CodigoInterno1 = Me.cmbCodigoInternoVH.Text

The error is telling you that the value in one of those textboxes cannot be converted to an Integer.

Specifically, the textbox is empty. An empty string cannot be converted to an Integer.

Use Integer.TryParse[^] to attempt to convert the user input to an integer. If it fails, report an error to the user.
VB.NET
If Not Integer.TryParse(Me.cmbCodigoInternoEDC.Text, CodigoInterno) Then
    Me.cmbCodigoInternoEDC.Focus()
    MessageBox.Show("Please enter a valid number")
    Return
End If

If Not Integer.TryParse(Me.cmbCodigoInternoVH.Text, CodigoInterno1) Then
    Me.cmbCodigoInternoVH.Focus()
    MessageBox.Show("Please enter a valid number")
    Return
End If




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer

GeneralRe: i want to erase two datatables with a single button please help Pin
Augusto10011-Sep-19 4:16
Augusto10011-Sep-19 4:16 
GeneralRe: i want to erase two datatables with a single button please help Pin
Richard MacCutchan11-Sep-19 6:38
mveRichard MacCutchan11-Sep-19 6:38 
GeneralRe: i want to erase two datatables with a single button please help Pin
Augusto10013-Sep-19 6:58
Augusto10013-Sep-19 6:58 
GeneralRe: i want to erase two datatables with a single button please help Pin
Richard Deeming13-Sep-19 7:21
mveRichard Deeming13-Sep-19 7:21 
AnswerRe: i want to erase two datatables with a single button please help Pin
Richard Deeming10-Sep-19 1:33
mveRichard Deeming10-Sep-19 1:33 
QuestionHow to perform non-case search in DataGridViewComboBoxColumn Pin
mo14923-Sep-19 8:09
mo14923-Sep-19 8:09 
SuggestionRe: How to perform non-case search in DataGridViewComboBoxColumn Pin
CHill603-Sep-19 23:38
mveCHill603-Sep-19 23:38 
GeneralRe: How to perform non-case search in DataGridViewComboBoxColumn Pin
mo14924-Sep-19 4:58
mo14924-Sep-19 4:58 
GeneralRe: How to perform non-case search in DataGridViewComboBoxColumn Pin
CHill605-Sep-19 0:02
mveCHill605-Sep-19 0:02 
GeneralRe: How to perform non-case search in DataGridViewComboBoxColumn Pin
mo14925-Sep-19 5:42
mo14925-Sep-19 5:42 
QuestionLinq, GroupBy, Select, First() or Last() Pin
jkirkerx28-Aug-19 12:38
professionaljkirkerx28-Aug-19 12:38 
AnswerRe: Linq, GroupBy, Select, First() or Last() Pin
Maciej Los28-Aug-19 21:24
mveMaciej Los28-Aug-19 21:24 
GeneralRe: Linq, GroupBy, Select, First() or Last() Pin
jkirkerx29-Aug-19 6:59
professionaljkirkerx29-Aug-19 6:59 
AnswerRe: Linq, GroupBy, Select, First() or Last() Pin
Richard Deeming29-Aug-19 7:14
mveRichard Deeming29-Aug-19 7:14 
GeneralRe: Linq, GroupBy, Select, First() or Last() Pin
jkirkerx29-Aug-19 8:32
professionaljkirkerx29-Aug-19 8:32 
QuestionTrying to make a fixed asset program using visual studio and sql server I got a conversion error varchar to numeric Pin
Augusto10026-Aug-19 6:51
Augusto10026-Aug-19 6:51 
AnswerRe: Trying to make a fixed asset program using visual studio and sql server I got a conversion error varchar to numeric Pin
ZurdoDev26-Aug-19 7:38
professionalZurdoDev26-Aug-19 7:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.