By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,963 Members | 1,041 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,963 IT Pros & Developers. It's quick & easy.

Problem on Update Acsess database And add or do over one time database

P: 2
hi every one,

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
  1.             '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 & "' "
  2.             'cmd.Parameters.AddWithValue("@efullname", TextBox4.Text)
  3.             'cmd.Parameters.AddWithValue("@eusername", TextBox1.Text)
  4.             'cmd.Parameters.AddWithValue("@epassword", TextBox2.Text)
  5.             'cmd.Parameters.AddWithValue("@emobile", TextBox3.Text)
  6.             'cmd.Parameters.AddWithValue("@eemail", TextBox5.Text)
  7.             'cmd.Parameters.AddWithValue("@esalary", TextBox6.Text)
  8.             'cmd.Parameters.AddWithValue("@stdate", DateTimePicker1.Value.ToString("dd/MM/yyyy"))
  9.             'cmd.Parameters.AddWithValue("@nddate", DateTimePicker2.Value.ToString("dd/MM/yyyy"))
  10.             If con.State = ConnectionState.Open Then con.Close()
  11.             con.Open()
  12.  
  13.  
  14.             Try
  15.  
  16.                 cmd.ExecuteNonQuery()
  17.                 cmd.Dispose()
  18.                 con.Close()
  19. End try
  20.  

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
Jul 12 '15 #1
Share this Question
Share on Google+
1 Reply


P: 2
Sorry

For Update my post

I'm Waiting any reply
Jul 20 '15 #2

Post your reply

Sign in to post your reply or Sign up for a free account.