SQL Datatype WinForm Textbox Validation?
-
Just like the title sounds. I am looking for a control or something where I can easily validate textboxes depending on the bound data control to that text box. Ideally, VS2008 would know what kind of data type is bound to that field through the datafield but i doubt if such a thing exists. Even if i have to manually say that this text box is only ment for INT SQL datatypes then limits only to 0-9 would be great with block of adding text characters in that text box. I know I can set the length very easily and this is great for varchar fields that are bound to text boxes but i need something for Floats, Reals, Ints that are bound to text boxes! Any suggestions? FYI, I hate Regex but think i may have to go that route. Are there any regex expressions that are compatible with SQL datatypes?
-
Just like the title sounds. I am looking for a control or something where I can easily validate textboxes depending on the bound data control to that text box. Ideally, VS2008 would know what kind of data type is bound to that field through the datafield but i doubt if such a thing exists. Even if i have to manually say that this text box is only ment for INT SQL datatypes then limits only to 0-9 would be great with block of adding text characters in that text box. I know I can set the length very easily and this is great for varchar fields that are bound to text boxes but i need something for Floats, Reals, Ints that are bound to text boxes! Any suggestions? FYI, I hate Regex but think i may have to go that route. Are there any regex expressions that are compatible with SQL datatypes?
textbox.length propriety There´s no need to create a new control, just validade with code. If you know how to connect to a database what is your problem there? Float, Int, Datetime i work them almost the same way, no special atention. Do you already have done the connection to your database?:confused: What do you have done so far?
-
textbox.length propriety There´s no need to create a new control, just validade with code. If you know how to connect to a database what is your problem there? Float, Int, Datetime i work them almost the same way, no special atention. Do you already have done the connection to your database?:confused: What do you have done so far?