Click here to Skip to main content
15,881,600 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: How can i make the official VB.net TCP async Example work ?! Pin
Dave Kreskowiak21-Apr-16 2:09
mveDave Kreskowiak21-Apr-16 2:09 
GeneralRe: How can i make the official VB.net TCP async Example work ?! Pin
Ghassan Mohamed Yousif22-Apr-16 9:45
Ghassan Mohamed Yousif22-Apr-16 9:45 
GeneralRe: How can i make the official VB.net TCP async Example work ?! Pin
Dave Kreskowiak22-Apr-16 15:57
mveDave Kreskowiak22-Apr-16 15:57 
QuestionConversion from string "" to type 'Integer' is not valid Pin
kishore-201620-Apr-16 1:46
kishore-201620-Apr-16 1:46 
AnswerRe: Conversion from string "" to type 'Integer' is not valid Pin
Richard MacCutchan20-Apr-16 2:02
mveRichard MacCutchan20-Apr-16 2:02 
AnswerRe: Conversion from string "" to type 'Integer' is not valid Pin
Sascha Lefèvre20-Apr-16 2:29
professionalSascha Lefèvre20-Apr-16 2:29 
AnswerRe: Conversion from string "" to type 'Integer' is not valid Pin
CHill6020-Apr-16 2:37
mveCHill6020-Apr-16 2:37 
GeneralRe: Conversion from string "" to type 'Integer' is not valid Pin
kishore-201621-Apr-16 5:44
kishore-201621-Apr-16 5:44 
Hi chill,

i am getting same error after modified.

Public Sub frmElogsheet_SAVE()

btneditelog.Enabled = False
btndelelog.Enabled = False
Dim conn As New SqlConnection
Dim cmd As New SqlCommand
' Dim dr As SqDataReader
conn = GetConnect()
conn.Open()
cmd.Connection = conn


Try

Dim code1 As Integer
Dim code2, code4, code5, code6, code7, code13 As String
Dim code8, code9 As Integer
Dim code3, code10, code11, code12 As String 'date

code1 = txtallocateelog.Text
code2 = txtvehicleElog.Text
code3 = txtRequestdateElog.Text
code4 = txtDestElog.Text
code5 = txtdeptElog.Text
code6 = txttravellerElog.Text
code7 = txtdvr2.Text
code8 = txtkmreaddept.Text
code9 = txtkmarr.Text
code10 = dtpdepttime.Text
code11 = dtparr.Text
code12 = dtpovertime.Text
code13 = Combacci.Text

'g900 = code2 'it will pass value to accident form

'cmd.CommandText = "insert into tbElogsheet(Allocate_id,Number_plate,Depart_date,Destination,Department,Traveller,NAME,km_read_dept,km_read_arr,Departure_time,Arrival_time,Over_time,Accident) VALUES (" & code1 & ",'" & code2 & "','" & code3 & "','" & code4 & "','" & code5 & "','" & code6 & "','" & code7 & "'," & code8 & "," & code9 & ",'" & code10 & "','" & code11 & "','" & code12 & "','" & code13 & "')"
'cmd.ExecuteNonQuery()

cmd.CommandText ="insert into tbElogsheet(Allocate_id,Number_plate,Depart_date,Destination,Department,Traveller,NAME,km_read_dept,km_read_arr,Departure_time,Arrival_time,Over_time,Accident) VALUES (@code1,@code2,@code3,@code4,@code5,@code6,@code7,@code8,@code9,@code10,@code11,@code12,@code13)"
cmd.Parameters.AddWithValue("@code1", code1)
cmd.Parameters.AddWithValue("@code2", code2)
cmd.Parameters.AddWithValue("@code3", code3)
cmd.Parameters.AddWithValue("@code4", code4)
cmd.Parameters.AddWithValue("@code5", code5)
cmd.Parameters.AddWithValue("@code6", code6)
cmd.Parameters.AddWithValue("@code7", code7)
cmd.Parameters.AddWithValue("@code8", code8)
cmd.Parameters.AddWithValue("@code9", code9)
cmd.Parameters.AddWithValue("@code10", code10)
cmd.Parameters.AddWithValue("@code11", code11)
cmd.Parameters.AddWithValue("@code12", code12)
cmd.Parameters.AddWithValue("@code13", code13)
cmd.ExecuteNonQuery()

MsgBox("ELOGSHEET Added Sucessfully")

'frmElogsheet_clear() 'clear elogsheet items after saving

'txtkmreaddept.Text = g101

Catch ex As Exception
MsgBox(ex.Message)
End Try
'conn.Close()
End Sub
GeneralRe: Conversion from string "" to type 'Integer' is not valid Pin
Richard Deeming21-Apr-16 5:54
mveRichard Deeming21-Apr-16 5:54 
GeneralRe: Conversion from string "" to type 'Integer' is not valid Pin
CHill6021-Apr-16 6:17
mveCHill6021-Apr-16 6:17 
GeneralRe: Conversion from string "" to type 'Integer' is not valid Pin
kishore-201621-Apr-16 6:26
kishore-201621-Apr-16 6:26 
QuestionVB6 File not found: 'C:\Users\???\AppData\Local\Temp\VBB685.tmp' Pin
ThePotty120-Apr-16 1:07
ThePotty120-Apr-16 1:07 
AnswerRe: VB6 File not found: 'C:\Users\???\AppData\Local\Temp\VBB685.tmp' Pin
Dave Kreskowiak20-Apr-16 4:18
mveDave Kreskowiak20-Apr-16 4:18 
AnswerRe: VB6 File not found: 'C:\Users\???\AppData\Local\Temp\VBB685.tmp' Pin
CHill6021-Apr-16 6:13
mveCHill6021-Apr-16 6:13 
QuestionVBA minimum margin Pin
JR21219-Apr-16 21:00
JR21219-Apr-16 21:00 
SuggestionRe: VBA minimum margin Pin
Richard MacCutchan19-Apr-16 23:28
mveRichard MacCutchan19-Apr-16 23:28 
GeneralRe: VBA minimum margin Pin
JR21220-Apr-16 19:03
JR21220-Apr-16 19:03 
GeneralRe: VBA minimum margin Pin
Richard MacCutchan20-Apr-16 21:05
mveRichard MacCutchan20-Apr-16 21:05 
GeneralRe: VBA minimum margin Pin
JR21220-Apr-16 22:32
JR21220-Apr-16 22:32 
GeneralRe: VBA minimum margin Pin
Richard MacCutchan20-Apr-16 22:38
mveRichard MacCutchan20-Apr-16 22:38 
Questionrichtexbox1.selectionfont Pin
Member 1243617019-Apr-16 9:46
Member 1243617019-Apr-16 9:46 
AnswerRe: richtexbox1.selectionfont Pin
Richard MacCutchan19-Apr-16 20:50
mveRichard MacCutchan19-Apr-16 20:50 
AnswerRe: richtexbox1.selectionfont Pin
Eddy Vluggen20-Apr-16 2:56
professionalEddy Vluggen20-Apr-16 2:56 
QuestionVB 2010 Error: Property access must assign to the property or use its values. Pin
Gus11317-Apr-16 22:35
Gus11317-Apr-16 22:35 
QuestionRe: VB 2010 Error: Property access must assign to the property or use its values. Pin
Richard MacCutchan17-Apr-16 22:43
mveRichard MacCutchan17-Apr-16 22:43 

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.