Click here to Skip to main content
15,791,846 members
Home / Discussions / C#
   

C#

 
GeneralRe: DataRepeater Control Pin
Heath Stewart8-Dec-03 10:34
protectorHeath Stewart8-Dec-03 10:34 
GeneralHelp with simple user control Pin
Charlie Williams8-Dec-03 9:05
Charlie Williams8-Dec-03 9:05 
GeneralRe: Help with simple user control Pin
Heath Stewart8-Dec-03 10:25
protectorHeath Stewart8-Dec-03 10:25 
GeneralRe: Help with simple user control Pin
Charlie Williams8-Dec-03 12:56
Charlie Williams8-Dec-03 12:56 
QuestionDynamic Table Creation on Database Using SQL Datatypes from a Dataset, Possible? Pin
Paul Evans8-Dec-03 7:46
Paul Evans8-Dec-03 7:46 
AnswerRe: Dynamic Table Creation on Database Using SQL Datatypes from a Dataset, Possible? Pin
Heath Stewart8-Dec-03 8:01
protectorHeath Stewart8-Dec-03 8:01 
GeneralRe: Dynamic Table Creation on Database Using SQL Datatypes from a Dataset, Possible? Pin
Paul Evans8-Dec-03 8:19
Paul Evans8-Dec-03 8:19 
GeneralRe: Dynamic Table Creation on Database Using SQL Datatypes from a Dataset, Possible? Pin
Heath Stewart8-Dec-03 10:04
protectorHeath Stewart8-Dec-03 10:04 
Actually, I said it's not possible with the classes in the BCL (base class library). You could make (or a third-party library may already exist) a class (or classes) that takes those mappings and generates and / or executes the appropriate CREATE TABLE or ALTER TABLE commands.

It was obvious you were using SQL Server because you were refencing the System.Data.SqlClient classes! Smile | :) They only work for SQL Server (specifying any other OLE DB provider throws an exception when initializing a SqlConnection. If you don't want to use SQL Server, you MUST use the System.Data.OleDb namespace classes (or a custom provider implementation, such as ODBC.NET or Oracle.NET - others also exist in beta form last time I checked-up on them).

The SQL classes do understand the data-types as you suspect (and it is well-documented). This comes at an expense, though. Instead, you should consider using strongly-typed DataSet classes when possible. This makes table and column lookups - as well as field resolution - must faster and more type-friendly. For instance, many people always use DataRow[string] to get a column value, but this is very expensive because it must enumerating the columns each time to find the column with that name. There are ways to make this faster (such as caching the column index for that name), but strongly-typed DataSet classes do something similar automatically (technically, they already know the column indexes).

 

-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
GeneralThread-Safe Singleton Pin
bzurer8-Dec-03 5:18
bzurer8-Dec-03 5:18 
GeneralRe: Thread-Safe Singleton Pin
Heath Stewart8-Dec-03 6:07
protectorHeath Stewart8-Dec-03 6:07 
GeneralRe: Thread-Safe Singleton Pin
Paul Evans8-Dec-03 7:37
Paul Evans8-Dec-03 7:37 
GeneralRe: Thread-Safe Singleton Pin
Heath Stewart8-Dec-03 7:56
protectorHeath Stewart8-Dec-03 7:56 
GeneralRe: Thread-Safe Singleton Pin
Paul Evans8-Dec-03 8:05
Paul Evans8-Dec-03 8:05 
GeneralRe: Thread-Safe Singleton Pin
Heath Stewart8-Dec-03 8:12
protectorHeath Stewart8-Dec-03 8:12 
GeneralRe: Thread-Safe Singleton Pin
Paul Evans8-Dec-03 8:20
Paul Evans8-Dec-03 8:20 
GeneralRe: Thread-Safe Singleton Pin
Heath Stewart8-Dec-03 11:08
protectorHeath Stewart8-Dec-03 11:08 
GeneralRe: Thread-Safe Singleton Pin
bzurer8-Dec-03 8:07
bzurer8-Dec-03 8:07 
GeneralRe: Thread-Safe Singleton Pin
Heath Stewart8-Dec-03 8:10
protectorHeath Stewart8-Dec-03 8:10 
GeneralRe: Thread-Safe Singleton Pin
bzurer8-Dec-03 8:56
bzurer8-Dec-03 8:56 
GeneralRe: Thread-Safe Singleton Pin
Heath Stewart8-Dec-03 10:14
protectorHeath Stewart8-Dec-03 10:14 
GeneralRe: Thread-Safe Singleton Pin
Zhang Ye Fan8-Dec-03 8:33
Zhang Ye Fan8-Dec-03 8:33 
GeneralRe: Thread-Safe Singleton Pin
Heath Stewart8-Dec-03 10:08
protectorHeath Stewart8-Dec-03 10:08 
GeneralRe: Thread-Safe Singleton Pin
bzurer11-Dec-03 4:31
bzurer11-Dec-03 4:31 
GeneralRe: Thread-Safe Singleton Pin
Heath Stewart11-Dec-03 5:30
protectorHeath Stewart11-Dec-03 5:30 
GeneralRe: Thread-Safe Singleton Pin
bzurer11-Dec-03 5:56
bzurer11-Dec-03 5:56 

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.