Click here to Skip to main content
16,007,760 members
Home / Discussions / C#
   

C#

 
AnswerRe: how to create a file as hidden? Pin
Hesham Amin28-Jun-05 1:52
Hesham Amin28-Jun-05 1:52 
GeneralRe: how to create a file as hidden? Pin
Green Fuze28-Jun-05 3:58
Green Fuze28-Jun-05 3:58 
GeneralGenerate an Image using ByteCode/HexaView Pin
MDKrishan27-Jun-05 21:29
MDKrishan27-Jun-05 21:29 
GeneralGenerate an Image using ByteCode/HexaView Pin
MDKrishan27-Jun-05 21:25
MDKrishan27-Jun-05 21:25 
GeneralDataAdapter.Fill Problems Pin
metalsandman27-Jun-05 21:20
metalsandman27-Jun-05 21:20 
GeneralRe: DataAdapter.Fill Problems Pin
Piovra_27-Jun-05 21:38
Piovra_27-Jun-05 21:38 
GeneralRe: DataAdapter.Fill Problems Pin
metalsandman27-Jun-05 23:44
metalsandman27-Jun-05 23:44 
GeneralRe: DataAdapter.Fill Problems Pin
Dave Kreskowiak28-Jun-05 4:34
mveDave Kreskowiak28-Jun-05 4:34 
Somehwere along this line of code, you're attempting to use an object that wasn't created. For instance:
IDbCommand command = DbManager.GetCommandWithDefaultOpenConnection(commandText);
((SqlDataAdapter)GetDataAdapter(command)).Fill(table);
command.Connection.Close();

Did .GetCommandWithDefaultOpenConnection(commandText) actually return an object? You don't know because you didn't check for it before you attempted to use its .Fill(table) method.

Another couple questions would be, does that table parameter represent an actual object or is it possible that it it a Null reference. Does the GetDataAdapter(command) method call actually return an object?

You're making all these calls to create objects, but your code is assuming that they all worked. It's never checking the return values of any of these calls, and therefore, you have a failure (NullReferenceException) that you cannot easily trace down.

Oh, as a side-bar, you can only have one active DataAdapter per Connection object.


RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

GeneralRe: DataAdapter.Fill Problems Pin
metalsandman28-Jun-05 4:43
metalsandman28-Jun-05 4:43 
GeneralManipulate cells in datagrid Pin
Piovra_27-Jun-05 20:27
Piovra_27-Jun-05 20:27 
GeneralRe: Manipulate cells in datagrid Pin
sreejith ss nair28-Jun-05 0:02
sreejith ss nair28-Jun-05 0:02 
Generalexport excell file to SQL SERVER Pin
dabuskol27-Jun-05 19:58
dabuskol27-Jun-05 19:58 
GeneralRe: export excell file to SQL SERVER Pin
harbanone28-Jul-05 7:15
harbanone28-Jul-05 7:15 
GeneralSQL and loops Pin
mhmo27-Jun-05 19:50
mhmo27-Jun-05 19:50 
GeneralRe: SQL and loops Pin
Christian Graus27-Jun-05 19:53
protectorChristian Graus27-Jun-05 19:53 
GeneralRe: SQL and loops Pin
mhmo27-Jun-05 20:02
mhmo27-Jun-05 20:02 
GeneralRe: SQL and loops Pin
Christian Graus27-Jun-05 20:04
protectorChristian Graus27-Jun-05 20:04 
GeneralRe: SQL and loops Pin
mhmo27-Jun-05 20:11
mhmo27-Jun-05 20:11 
GeneralRe: SQL and loops Pin
Christian Graus27-Jun-05 20:31
protectorChristian Graus27-Jun-05 20:31 
GeneralRe: SQL and loops Pin
mhmo27-Jun-05 20:38
mhmo27-Jun-05 20:38 
GeneralRe: SQL and loops Pin
Christian Graus27-Jun-05 20:48
protectorChristian Graus27-Jun-05 20:48 
GeneralRe: SQL and loops Pin
mhmo27-Jun-05 20:52
mhmo27-Jun-05 20:52 
GeneralRe: SQL and loops Pin
Christian Graus27-Jun-05 20:56
protectorChristian Graus27-Jun-05 20:56 
GeneralRe: SQL and loops Pin
mhmo27-Jun-05 22:34
mhmo27-Jun-05 22:34 
GeneralRe: SQL and loops Pin
MicrosoftBob28-Jun-05 4:45
MicrosoftBob28-Jun-05 4:45 

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.