Click here to Skip to main content
15,907,906 members
Home / Discussions / C#
   

C#

 
GeneralRe: Toolbar Component Setting Pin
Heath Stewart14-Nov-03 2:37
protectorHeath Stewart14-Nov-03 2:37 
Generalhandling a voice event Pin
eafares26513-Nov-03 10:15
eafares26513-Nov-03 10:15 
GeneralRe: handling a voice event Pin
Kentamanos13-Nov-03 10:47
Kentamanos13-Nov-03 10:47 
GeneralRe: handling a voice event Pin
eafares26514-Nov-03 5:03
eafares26514-Nov-03 5:03 
GeneralBlock scope when using 'using' statement. Pin
Bill Priess13-Nov-03 6:29
Bill Priess13-Nov-03 6:29 
GeneralRe: Block scope when using 'using' statement. Pin
Heath Stewart13-Nov-03 7:06
protectorHeath Stewart13-Nov-03 7:06 
GeneralRe: Block scope when using 'using' statement. Pin
Bill Priess13-Nov-03 7:34
Bill Priess13-Nov-03 7:34 
GeneralRe: Block scope when using 'using' statement. Pin
Heath Stewart13-Nov-03 8:42
protectorHeath Stewart13-Nov-03 8:42 
First of all, you don't need to worry about disposing managed objects all the time. The garbage collector will take care of that eventually. Disposing it just cleans it up immediately.

Second, the using statement merely causes the Dispose method to be called on objects that implement IDisposable. The DataTable is not tied to a SqlDataAdapter (i.e., not a field or anything else that gets disposed). Because you're giving the DataTable a name, the result have to match that name to be filled. Use a TableMapping mapping or don't give the DataTable and name and see what you get.

And yes, had you mentioned that you were setting the CommandType, I wouldn't have mentioned that. The default, however, is CommandText so it was worth mentioning from my perspective with the knowledge you provided.

 

-----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-----
GeneralRe: Block scope when using 'using' statement. Pin
Bill Priess13-Nov-03 9:54
Bill Priess13-Nov-03 9:54 
Generaldotnetmagic concepts Pin
mikemilano13-Nov-03 6:13
mikemilano13-Nov-03 6:13 
GeneralRe: dotnetmagic concepts Pin
Heath Stewart13-Nov-03 6:49
protectorHeath Stewart13-Nov-03 6:49 
GeneralCompiler error Pin
Jose Vicente13-Nov-03 5:16
Jose Vicente13-Nov-03 5:16 
GeneralRe: Compiler error Pin
Heath Stewart13-Nov-03 6:40
protectorHeath Stewart13-Nov-03 6:40 
GeneralRe: Compiler error Pin
Jose Vicente13-Nov-03 20:39
Jose Vicente13-Nov-03 20:39 
GeneralRe: Compiler error Pin
Heath Stewart14-Nov-03 1:59
protectorHeath Stewart14-Nov-03 1:59 
GeneralSimple question: PerformanceCounter Pin
CillyMe13-Nov-03 4:27
CillyMe13-Nov-03 4:27 
GeneralRe: Simple question: PerformanceCounter Pin
leppie13-Nov-03 6:25
leppie13-Nov-03 6:25 
GeneralRe: Simple question: PerformanceCounter Pin
CillyMe13-Nov-03 13:45
CillyMe13-Nov-03 13:45 
GeneralRe: Simple question: PerformanceCounter Pin
leppie13-Nov-03 14:05
leppie13-Nov-03 14:05 
GeneralC# and Excel Pin
Member 51858613-Nov-03 4:18
Member 51858613-Nov-03 4:18 
Generalhelp needed to create custom control which can arrange controls in polygonal shape. Pin
Shailaja13-Nov-03 4:08
Shailaja13-Nov-03 4:08 
GeneralRe: help needed to create custom control which can arrange controls in polygonal shape. Pin
Heath Stewart13-Nov-03 6:31
protectorHeath Stewart13-Nov-03 6:31 
GeneralDistributed Transaction Pin
CillyMe12-Nov-03 22:15
CillyMe12-Nov-03 22:15 
QuestionRichTextBox Change Picture?? Pin
electronicm12-Nov-03 22:14
electronicm12-Nov-03 22:14 
AnswerRe: RichTextBox Change Picture?? Pin
Anonymous13-Nov-03 10:26
Anonymous13-Nov-03 10:26 

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.