formatc
formatc

Reputation: 4323

Get sql type name from DbType

I need to print real datbase type name from DbParameter.DbType, but when I do something like this DbParameter.DbType.ToString() I get for example Int32 instead of int, is there a command or a property to do that or am I going to need to write switch statement?

Here is code if someone will need it: DbType to real SQL type string

Upvotes: 2

Views: 1770

Answers (1)

HatSoft
HatSoft

Reputation: 11201

You will have to write your own converter

The data type mappings can be found here MSDN

Upvotes: 2

Related Questions