Click here to Skip to main content
15,892,298 members
Home / Discussions / C#
   

C#

 
GeneralRe: Arrays and Threads Pin
Daniel Turini7-Jul-03 15:04
Daniel Turini7-Jul-03 15:04 
GeneralRe: Arrays and Threads Pin
albean7-Jul-03 18:02
albean7-Jul-03 18:02 
GeneralYankees Pin
eggie57-Jul-03 11:38
eggie57-Jul-03 11:38 
GeneralRe: Yankees Pin
Rocky Moore7-Jul-03 12:00
Rocky Moore7-Jul-03 12:00 
GeneralRe: Yankees Pin
James T. Johnson8-Jul-03 4:10
James T. Johnson8-Jul-03 4:10 
GeneralMIME decoder Pin
jay_n7-Jul-03 11:26
jay_n7-Jul-03 11:26 
GeneralRe: MIME decoder Pin
Rocky Moore7-Jul-03 12:07
Rocky Moore7-Jul-03 12:07 
GeneralC# to SQL Server Type Translation Lookup Pin
perlmunger7-Jul-03 11:13
perlmunger7-Jul-03 11:13 
I am using SQLDMO to build a code generation application. When I find a column type in a given table, it usually comes back with the name 'int' for an integer, 'varchar' for a VarChar etc. The problem is that I need to do a translation from that sql type to the approrpriate SqlDbType in C# (e.g. SqlDbType.Int, SqlDbType.VarChar), so that I can output some source code that will build with no further modification. I, obviously, could just ignore the case difference and make the change manually to the generated code, but it seems there should be a way to avoid this.

Now, of course, I could create my own hashtable and hard code the mapped values (e.g. 'int' -> 'Int', 'varchar' -> 'VarChar', etc.), but it occured to me that this may already be in either the framework or the SQLDMO. Is anyone aware of a way to make this translation using a built-in mechanism? Or am I stuck creating a hard-coded map?

TIA.

-Matt

------------------------------------------

The 3 great virtues of a programmer:
Laziness, Impatience, and Hubris.
--Larry Wall
GeneralRe: C# to SQL Server Type Translation Lookup Pin
Mark Smithson8-Jul-03 10:48
Mark Smithson8-Jul-03 10:48 
GeneralRe: C# to SQL Server Type Translation Lookup Pin
perlmunger8-Jul-03 11:59
perlmunger8-Jul-03 11:59 
GeneralReusing Forms Pin
D Betting7-Jul-03 10:27
sussD Betting7-Jul-03 10:27 
GeneralRe: Reusing Forms Pin
Andy Smith7-Jul-03 10:42
Andy Smith7-Jul-03 10:42 
Generaldelegate context Pin
albean7-Jul-03 10:15
albean7-Jul-03 10:15 
GeneralRe: delegate context Pin
Mark Smithson8-Jul-03 10:56
Mark Smithson8-Jul-03 10:56 
QuestionSourceSafe event sink in c#? Pin
ODS7-Jul-03 9:25
ODS7-Jul-03 9:25 
GeneralCompile C# run under Windows 98 Pin
Hoang Dung7-Jul-03 9:04
Hoang Dung7-Jul-03 9:04 
GeneralRe: Compile C# run under Windows 98 Pin
jspano7-Jul-03 9:28
jspano7-Jul-03 9:28 
GeneralRe: Compile C# run under Windows 98 Pin
Hoang Dung9-Jul-03 7:26
Hoang Dung9-Jul-03 7:26 
GeneralRe: Compile C# run under Windows 98 Pin
jspano9-Jul-03 8:30
jspano9-Jul-03 8:30 
GeneralRe: Compile C# run under Windows 98 Pin
Hoang Dung11-Jul-03 7:19
Hoang Dung11-Jul-03 7:19 
QuestionHow to know numeric of instance... Pin
Hoang Dung7-Jul-03 8:59
Hoang Dung7-Jul-03 8:59 
AnswerRe: How to know numeric of instance... Pin
jspano7-Jul-03 9:30
jspano7-Jul-03 9:30 
GeneralRe: How to know numeric of instance... Pin
Hoang Dung11-Jul-03 7:21
Hoang Dung11-Jul-03 7:21 
QuestionCapture the HTTP request header? Pin
Bog7-Jul-03 7:49
Bog7-Jul-03 7:49 
QuestionAm I being dense? Pin
SpudgunDoogal7-Jul-03 6:01
SpudgunDoogal7-Jul-03 6:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.