Click here to Skip to main content
15,905,967 members
Home / Discussions / C#
   

C#

 
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.
GeneralRe: Large databases Pin
WillemM24-Oct-03 20:39
WillemM24-Oct-03 20:39 
GeneralSetup Questionn Pin
Mazdak23-Oct-03 23:11
Mazdak23-Oct-03 23:11 
GeneralRe: Setup Questionn Pin
antoine@orchus-tech24-Oct-03 4:33
antoine@orchus-tech24-Oct-03 4:33 
GeneralRe: Setup Questionn Pin
Adam Turner26-Nov-03 19:39
Adam Turner26-Nov-03 19:39 
GeneralRe: Setup Questionn Pin
Mazdak27-Nov-03 8:31
Mazdak27-Nov-03 8:31 
GeneralTimeout WebException of GetResponseStream().Read Pin
PrimeYork23-Oct-03 21:49
PrimeYork23-Oct-03 21:49 
Generalprint page number Pin
hkl23-Oct-03 15:25
hkl23-Oct-03 15:25 
GeneralRe: print page number Pin
mistery2225-Oct-03 2:46
mistery2225-Oct-03 2:46 
GeneralRe: print page number Pin
hkl27-Oct-03 8:38
hkl27-Oct-03 8:38 
GeneralRe: print page number Pin
hkl27-Oct-03 9:00
hkl27-Oct-03 9:00 
GeneralButton Pin
Gary Kirkham23-Oct-03 10:55
Gary Kirkham23-Oct-03 10:55 
GeneralRe: Button Pin
Tomas Petricek23-Oct-03 12:30
Tomas Petricek23-Oct-03 12:30 
GeneralRe: Button Pin
Gary Kirkham23-Oct-03 14:00
Gary Kirkham23-Oct-03 14:00 
GeneralRe: Button Pin
J. Dunlap23-Oct-03 14:12
J. Dunlap23-Oct-03 14:12 
GeneralRe: Button Pin
Gary Kirkham24-Oct-03 3:14
Gary Kirkham24-Oct-03 3:14 
GeneralTransparency Pin
Den2Fly23-Oct-03 10:00
Den2Fly23-Oct-03 10:00 
GeneralRe: Transparency Pin
Jeremy Kimball24-Oct-03 5:24
Jeremy Kimball24-Oct-03 5:24 

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.