0

How to resolve the error in c sharp... which is ...input string was not in correct format

this occurs when im trting to save data in to ms access through form

7th Feb 2017, 1:43 PM
misal
2 Antworten
+ 1
I'm not familiar with how data is saved to access, but usually the reason this error is thrown is trying to convert a string to some other type, like ParseInt with string which has invalid characters, or is empty. I would suggest catching this exception and suppressing it (if that's what you need). Look at try { } catch (Exception e) { } construct https://msdn.microsoft.com/en-us/library/0yd65esw.aspx . But to get to the bottom of it you need to find out why you are getting this error, like invalid data in input field or something. Just suppressing error without knowing a reason it is thrown is not what you want. Learn to use debug features in Visual Studio, use breakpoints, step to the part where error is thrown, look what are the variables at that point. You will really need those skills.
7th Feb 2017, 3:43 PM
Ugnius Soraka
0
thanks ugnius .....
8th Feb 2017, 4:40 AM
misal