473,473 Members | 1,555 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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

2 New Member
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
1 2031
almusamim
2 New Member
Sorry

For Update my post

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

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

Similar topics

7
by: Graham Taylor | last post by:
I've tried posting this in the 'microsoft.public.access' but I will post it here also, as I think it might be the webserver which is causing my problem. --------- I have an Access 2003 database...
3
by: Tania | last post by:
Hi. I´ve a problem. I have two diffrent databases. And I want to update database B with database A. But when a column is missing in the B it won´t be insert with the update of A. Whole tables...
4
by: Jozef | last post by:
Hello, I'm trying to check for and add a field to a table to a back end database through code. The problem I've been faced with is changing permissions, because I have to use administer...
9
by: Pam Ammond | last post by:
I need the code to update the database when Save is clicked and a text field has changed. This should be very easy since I used Microsoft's wizards for the OleDBAdapter and OleDBConnection, and...
4
by: Macca | last post by:
Hi, I have an windows forms application that accesses a SQL database I have a few questions as to connecting to the database. This application will run 24 hours a day. It is a monitoring...
1
by: cguillot | last post by:
Hello, I have a web page that displays information from a SQL database and this information can change frequently. Basically, a database entry is made into a table every time a person enters or...
5
by: plenahan68 | last post by:
I've made a small vb.net program to read my database and delete records that are specific to my needs. Well, the program says it's complete but nothing is deleted from my database. I've listed the...
3
by: Martin Horn | last post by:
Hi all, I am using VB2005 and the new data controls, which all work fine, except there is a situation where I want to add a new row to the database without using the 'AddNewItem' button on the...
2
by: AccessWannaBe | last post by:
Can anyone spare a good example of how to update a specific field in a row within a table in an access database? I am good with fetching the data and representing in a table, but what if I want to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.