please i have some problems on my first project in vb.net
1st on update the row on acsess database the wronge message is :
Conversion from string "UPDATE [employee] SET [efullname" to type 'Double' is not valid.
but my efullname data is also string
code of update
Expand|Select|Wrap|Line Numbers
- 'cmd.CommandType = CommandType.Text = "UPDATE [employee] SET efullname=@efullname, eusername=@eusername, epassword=@epassword, emobile=@emobile, eemail=@eemail, esalary=@esalary, startworkingdate=@stdate, visaenddate=@nddate WHERE eusername = '" & usernameList.Text & "' "
- 'cmd.Parameters.AddWithValue("@efullname", TextBox4.Text)
- 'cmd.Parameters.AddWithValue("@eusername", TextBox1.Text)
- 'cmd.Parameters.AddWithValue("@epassword", TextBox2.Text)
- 'cmd.Parameters.AddWithValue("@emobile", TextBox3.Text)
- 'cmd.Parameters.AddWithValue("@eemail", TextBox5.Text)
- 'cmd.Parameters.AddWithValue("@esalary", TextBox6.Text)
- 'cmd.Parameters.AddWithValue("@stdate", DateTimePicker1.Value.ToString("dd/MM/yyyy"))
- 'cmd.Parameters.AddWithValue("@nddate", DateTimePicker2.Value.ToString("dd/MM/yyyy"))
- If con.State = ConnectionState.Open Then con.Close()
- con.Open()
- Try
- cmd.ExecuteNonQuery()
- cmd.Dispose()
- con.Close()
- End try
2nd problem When i add or do any process one time its ok
but when i add or any procsess again in same window thats going to erorr message on Opening conniction code ??
Thanks