Click here to Skip to main content
15,923,164 members
Home / Discussions / C#
   

C#

 
GeneralRe: getting unicode for a char Pin
leppie24-Oct-03 9:02
leppie24-Oct-03 9:02 
GeneralCustom control Pin
Lasse Johansen24-Oct-03 6:23
Lasse Johansen24-Oct-03 6:23 
GeneralRe: Custom control Pin
leppie24-Oct-03 9:21
leppie24-Oct-03 9:21 
GeneralRe: Custom control Pin
Anonymous27-Oct-03 14:47
Anonymous27-Oct-03 14:47 
GeneralC# 2.0 Specs now available Pin
Eric Gunnerson (msft)24-Oct-03 5:21
Eric Gunnerson (msft)24-Oct-03 5:21 
GeneralRe: C# 2.0 Specs now available Pin
Guillermo Rivero24-Oct-03 5:29
Guillermo Rivero24-Oct-03 5:29 
GeneralRe: C# 2.0 Specs now available Pin
WillemM24-Oct-03 5:52
WillemM24-Oct-03 5:52 
GeneralRe: C# 2.0 Specs now available Pin
Eric Gunnerson (msft)24-Oct-03 6:43
Eric Gunnerson (msft)24-Oct-03 6:43 
GeneralRe: C# 2.0 Specs now available Pin
Blake Coverett25-Oct-03 23:19
Blake Coverett25-Oct-03 23:19 
GeneralRe: C# 2.0 Specs now available Pin
Nick Parker24-Oct-03 6:41
protectorNick Parker24-Oct-03 6:41 
GeneralRe: C# 2.0 Specs now available Pin
Eric Gunnerson (msft)24-Oct-03 7:14
Eric Gunnerson (msft)24-Oct-03 7:14 
GeneralRe: C# 2.0 Specs now available Pin
Paul Riley25-Oct-03 4:06
Paul Riley25-Oct-03 4:06 
GeneralRe: C# 2.0 Specs now available Pin
leppie25-Oct-03 6:41
leppie25-Oct-03 6:41 
GeneralRe: C# 2.0 Specs now available Pin
Paul Riley25-Oct-03 23:54
Paul Riley25-Oct-03 23:54 
GeneralRe: C# 2.0 Specs now available Pin
Paul Riley26-Oct-03 0:25
Paul Riley26-Oct-03 0:25 
GeneralRe: C# 2.0 Specs now available Pin
leppie26-Oct-03 0:47
leppie26-Oct-03 0:47 
GeneralRe: C# 2.0 Specs now available Pin
Paul Riley26-Oct-03 2:07
Paul Riley26-Oct-03 2:07 
GeneralRe: C# 2.0 Specs now available Pin
Blake Coverett25-Oct-03 23:23
Blake Coverett25-Oct-03 23:23 
GeneralRe: C# 2.0 Specs now available Pin
Paul Riley26-Oct-03 0:20
Paul Riley26-Oct-03 0:20 
GeneralRe: C# 2.0 Specs now available Pin
Corinna John26-Oct-03 5:39
Corinna John26-Oct-03 5:39 
GeneralRe: C# 2.0 Specs now available Pin
Blake Coverett26-Oct-03 6:03
Blake Coverett26-Oct-03 6:03 
GeneralLarge databases Pin
WillemM24-Oct-03 3:02
WillemM24-Oct-03 3:02 
GeneralRe: Large databases Pin
Eric Gunnerson (msft)24-Oct-03 5:19
Eric Gunnerson (msft)24-Oct-03 5:19 
GeneralRe: Large databases Pin
WillemM24-Oct-03 5:24
WillemM24-Oct-03 5:24 
GeneralRe: Large databases Pin
Eric Gunnerson (msft)24-Oct-03 7:18
Eric Gunnerson (msft)24-Oct-03 7:18 
I've used the approach that you're thinking of with some reasonable success (but remember that I'm a Microsoft PM, and therefore, by definition, never write any *real code). Having it central has made things quite a bit easier, and allowed me to centralize things like caching.

My personal preference is not to use DataAdapters and DataSets when I take this approach, and write routines that look like:

public List<t> GetValues<t> (string selectStatement)
{
OleDbCommand select = new OleDbCommand (selectStatement, connection);
List<t> list = new List<t> ();
OleDbDataReader reader = select.ExecuteReader ();

while (reader.Read ())
{
list.Add ((T)reader[0]);
}

return list;
}

This is a version using Whidbey generics, but you get the idea. For me, this is much simpler to code and understand than using the built-in data support in VS. Of course, I spent 3 years working for a database company (SQL is my friend...), so your mileage may vary.

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.