Click here to Skip to main content
16,005,141 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to use SortedList.Item Property Pin
Heath Stewart5-Apr-04 17:42
protectorHeath Stewart5-Apr-04 17:42 
GeneralRe: How to use SortedList.Item Property Pin
Member 9576656-Apr-04 5:57
Member 9576656-Apr-04 5:57 
GeneralRe: How to use SortedList.Item Property Pin
Heath Stewart6-Apr-04 6:07
protectorHeath Stewart6-Apr-04 6:07 
QuestionSuspendLayout() - Does this work? Pin
Tristan Rhodes5-Apr-04 13:56
Tristan Rhodes5-Apr-04 13:56 
AnswerRe: SuspendLayout() - Does this work? Pin
Heath Stewart5-Apr-04 17:37
protectorHeath Stewart5-Apr-04 17:37 
GeneralRe: SuspendLayout() - Does this work? Pin
Tristan Rhodes5-Apr-04 22:32
Tristan Rhodes5-Apr-04 22:32 
GeneraloleDbDataAdapter and dataSet Pin
DougW485-Apr-04 13:10
DougW485-Apr-04 13:10 
GeneralRe: oleDbDataAdapter and dataSet Pin
Heath Stewart5-Apr-04 17:29
protectorHeath Stewart5-Apr-04 17:29 
The time to initialize a DataAdapter is negligible compared to the time to execute its Fill or Update methods which opens the connection and executes the appropriate commands based on the DiffGram (DataSet which change-tracking information). Set up your DataAdapters either upon initialization or use a provider pattern that initializes them only when needed (leaving the instances alive for future use).

Also, it's good to use typed DataSets. Typed columns refer to the columns in your tables directly, where referring to them by index - or worse, by name - requires several lookups. You can create typed DataSets in VS.NET by adding a new DataSet class to your project (Add->Add New Item) or using xsd.exe. The Solution Explorer can also help if you create a new DataSet class and drag-n-drop tables, views, or stored procs from a database connection to your design surface.

Finally, you really should read about the <cdoe>ComboBox.Text property. For one, it's only effective in some cases depending upon the value assigned to ComboBox.DropDownStyle. If you want to insert an empty element, after setting the DataSource property call Items.Insert(0, ""); or something similar. Take care, however, since this screw up your data binding (by inserting a null/empty column in your tables, which may violate a key constraint).

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: oleDbDataAdapter and dataSet Pin
MeterMan5-Apr-04 23:14
MeterMan5-Apr-04 23:14 
Generalassembly's dll extension Pin
Anonymous5-Apr-04 11:09
Anonymous5-Apr-04 11:09 
GeneralRe: assembly's dll extension Pin
Dave Kreskowiak5-Apr-04 11:25
mveDave Kreskowiak5-Apr-04 11:25 
GeneralRe: assembly's dll extension Pin
Heath Stewart5-Apr-04 11:34
protectorHeath Stewart5-Apr-04 11:34 
GeneralRe: assembly's dll extension Pin
Anonymous5-Apr-04 13:16
Anonymous5-Apr-04 13:16 
GeneralRe: assembly's dll extension Pin
Heath Stewart5-Apr-04 17:18
protectorHeath Stewart5-Apr-04 17:18 
GeneralRe: assembly's dll extension Pin
CWIZO6-Apr-04 2:47
CWIZO6-Apr-04 2:47 
GeneralRe: assembly's dll extension Pin
Heath Stewart6-Apr-04 2:52
protectorHeath Stewart6-Apr-04 2:52 
QuestionCatch Windows KeyPress Events? Pin
Verdant1235-Apr-04 9:32
Verdant1235-Apr-04 9:32 
AnswerRe: Catch Windows KeyPress Events? Pin
LongRange.Shooter5-Apr-04 9:43
LongRange.Shooter5-Apr-04 9:43 
AnswerRe: Catch Windows KeyPress Events? Pin
Heath Stewart5-Apr-04 9:50
protectorHeath Stewart5-Apr-04 9:50 
GeneralRe: Catch Windows KeyPress Events? Pin
Verdant1235-Apr-04 10:27
Verdant1235-Apr-04 10:27 
GeneralRe: Catch Windows KeyPress Events? Pin
Heath Stewart5-Apr-04 10:43
protectorHeath Stewart5-Apr-04 10:43 
GeneralRe: Catch Windows KeyPress Events? Pin
Verdant1235-Apr-04 12:36
Verdant1235-Apr-04 12:36 
QuestionMouseHover taking over one minute? Pin
LongRange.Shooter5-Apr-04 8:55
LongRange.Shooter5-Apr-04 8:55 
AnswerRe: MouseHover taking over one minute? Pin
leppie5-Apr-04 9:34
leppie5-Apr-04 9:34 
GeneralRe: MouseHover taking over one minute? Pin
LongRange.Shooter5-Apr-04 9:40
LongRange.Shooter5-Apr-04 9:40 

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.