SQL Data type validation
C#
5
Posts
3
Posters
0
Views
1
Watching
-
I need to create a method that accepts a string as a parameter and checks whether this parameter is a valid SQL Server datatype or not. Can someone help please? thanks
Hi, Change the method parameter from String to SqlDbType.
himanshu
-
I need to create a method that accepts a string as a parameter and checks whether this parameter is a valid SQL Server datatype or not. Can someone help please? thanks
How about
System.Enum.Parse ( typeof(System.Data.SqlDbType) , "datetime" , true )
? -
How about
System.Enum.Parse ( typeof(System.Data.SqlDbType) , "datetime" , true )
? -
Glad to be of service.