0

hi
i have textbox and i want to insert this text into access db but the field in db is number so i tried both functions val and cint to convert text to integer while iam inserting at the same time but i got error : Input string was not in correct format!

this is my code:

cmcontact.CommandText = "insert into table1_local(id) values" + (Val(Me.TextBox1.Text)) + ";"

2
Contributors
1
Reply
2
Views
10 Years
Discussion Span
Last Post by Jx_Man
0

why you don't make user to do not input string/char inputs? make them to input numbers only. so you don't have to convert input from text to number.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.