E
Enver A
Hey ppl! I need help again! Problem is this. This code below belongs to a
buttons click action,And it works perfectly on the first attempt. After i
close the software and re-deploy it, i always meet the exception of
unhandled event in line 1. After i hard-reset the Pocket PC it works
perfectly at the first attempt again. Can anyone tell me whats wrong with
this code?
connection6 = New SqlCeConnection(connstr6)
connection6.Open()
Dim command As SqlCeCommand = connection6.CreateCommand
Dim PARAM1 As String
Dim PARAM2 As String
Dim PARAM3 As String
Dim PARAM4 As String
Dim PARAM5 As String
Dim PARAM6 As String
Dim PARAM7 As String
command.CommandText = "INSERT INTO ARACLAR
(INDEXARC,ARCMARKA,ARCMD,ARCYLPER,ARCLSEBT,LSHVON,LSHVARKA)
VALUES(?,?,?,?,?,?,?)"
'Parameters are being given values
PARAM1 = "00001"
PARAM2 = "ALFA ROMEO"
PARAM3 = "TWINSPARK 1.6"
PARAM4 = "(2003 ve sonrasý)"
PARAM5 = "215/45R17 87W"
PARAM6 = "31"
PARAM7 = "32"
command.Parameters.Add("@INDEXARC", PARAM1)
command.Parameters.Add("@ARCMARKA", PARAM2)
command.Parameters.Add("@ARCMD", PARAM3)
command.Parameters.Add("@ARCYLPER", PARAM4)
command.Parameters.Add("@ARCLSEBT", PARAM5)
command.Parameters.Add("@LSHVON", PARAM6)
command.Parameters.Add("@LSHVARKA", PARAM7)
command.Prepare()
command.ExecuteNonQuery()
MsgBox("1st OK")
connection6.Close()
MsgBox("KAYIT YAPILDI")
connection6.Dispose()
buttons click action,And it works perfectly on the first attempt. After i
close the software and re-deploy it, i always meet the exception of
unhandled event in line 1. After i hard-reset the Pocket PC it works
perfectly at the first attempt again. Can anyone tell me whats wrong with
this code?
connection6 = New SqlCeConnection(connstr6)
connection6.Open()
Dim command As SqlCeCommand = connection6.CreateCommand
Dim PARAM1 As String
Dim PARAM2 As String
Dim PARAM3 As String
Dim PARAM4 As String
Dim PARAM5 As String
Dim PARAM6 As String
Dim PARAM7 As String
command.CommandText = "INSERT INTO ARACLAR
(INDEXARC,ARCMARKA,ARCMD,ARCYLPER,ARCLSEBT,LSHVON,LSHVARKA)
VALUES(?,?,?,?,?,?,?)"
'Parameters are being given values
PARAM1 = "00001"
PARAM2 = "ALFA ROMEO"
PARAM3 = "TWINSPARK 1.6"
PARAM4 = "(2003 ve sonrasý)"
PARAM5 = "215/45R17 87W"
PARAM6 = "31"
PARAM7 = "32"
command.Parameters.Add("@INDEXARC", PARAM1)
command.Parameters.Add("@ARCMARKA", PARAM2)
command.Parameters.Add("@ARCMD", PARAM3)
command.Parameters.Add("@ARCYLPER", PARAM4)
command.Parameters.Add("@ARCLSEBT", PARAM5)
command.Parameters.Add("@LSHVON", PARAM6)
command.Parameters.Add("@LSHVARKA", PARAM7)
command.Prepare()
command.ExecuteNonQuery()
MsgBox("1st OK")
connection6.Close()
MsgBox("KAYIT YAPILDI")
connection6.Dispose()