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

C#

 
AnswerRe: type casting a string to a type which is getting received in a string Pin
PIEBALDconsult21-Apr-10 3:57
mvePIEBALDconsult21-Apr-10 3:57 
QuestionSending a Custom Ethernet packet Pin
spiritboy20-Apr-10 22:48
spiritboy20-Apr-10 22:48 
QuestionICCompress Pin
TimSWatson20-Apr-10 22:38
TimSWatson20-Apr-10 22:38 
QuestionFileSystemWatcher problem when multi-files deletion in watched folder Pin
Rikq20-Apr-10 22:31
Rikq20-Apr-10 22:31 
QuestionHow to search Special Character in sql server 2005? [modified] Pin
Ashwani Dhiman20-Apr-10 22:11
Ashwani Dhiman20-Apr-10 22:11 
AnswerRe: How to search Special Character in sql server 2005? Pin
Ice_Freez0520-Apr-10 22:19
Ice_Freez0520-Apr-10 22:19 
QuestionSave XML Pin
NarVish20-Apr-10 22:04
NarVish20-Apr-10 22:04 
AnswerRe: Save XML Pin
Ice_Freez0520-Apr-10 22:22
Ice_Freez0520-Apr-10 22:22 
GeneralRe: Save XML Pin
NarVish20-Apr-10 23:20
NarVish20-Apr-10 23:20 
AnswerRe: Save XML Pin
surender.m20-Apr-10 23:51
surender.m20-Apr-10 23:51 
GeneralRe: Save XML Pin
NarVish21-Apr-10 0:09
NarVish21-Apr-10 0:09 
GeneralRe: Save XML Pin
surender.m21-Apr-10 0:21
surender.m21-Apr-10 0:21 
GeneralRe: Save XML Pin
NarVish21-Apr-10 0:51
NarVish21-Apr-10 0:51 
Questionfor loop??? Pin
jellybeannn20-Apr-10 21:57
jellybeannn20-Apr-10 21:57 
Questionsearching in datagridview c# Pin
LenaReu20-Apr-10 21:32
LenaReu20-Apr-10 21:32 
AnswerRe: searching in datagridview c# Pin
sanforjackass20-Apr-10 21:47
sanforjackass20-Apr-10 21:47 
QuestionSession Management with C# Pin
softwarejaeger20-Apr-10 21:29
softwarejaeger20-Apr-10 21:29 
QuestionObject reference not set to an instance of an object Pin
Ice_Freez0520-Apr-10 21:22
Ice_Freez0520-Apr-10 21:22 
AnswerRe: Object reference not set to an instance of an object Pin
OriginalGriff20-Apr-10 21:47
mveOriginalGriff20-Apr-10 21:47 
GeneralRe: Object reference not set to an instance of an object Pin
Ice_Freez0520-Apr-10 22:10
Ice_Freez0520-Apr-10 22:10 
GeneralRe: Object reference not set to an instance of an object Pin
OriginalGriff20-Apr-10 22:22
mveOriginalGriff20-Apr-10 22:22 
GeneralRe: Object reference not set to an instance of an object [modified] Pin
Ice_Freez0520-Apr-10 22:48
Ice_Freez0520-Apr-10 22:48 
thanks a lot for your help.i've found the error...

public int getRequestedFunctionID(string strFunctCode)
{
SQLiteCommand SQLComm;
SQLiteDataReader sqlDR = null;

int intFuncNameID = 0;

string strSQL = "SELECT FuncNameID " +
"FROM tblFuncName WHERE FunctCode = '" + strFunctCode + "'";

try
{
cnn = new SQLiteConnection(strConn);
cnn.Open();

SQLComm = new SQLiteCommand(strSQL, cnn);
sqlDR = SQLComm.ExecuteReader();


sqlDR.Read();
if (sqlDR.HasRows)
{
intFuncNameID = Convert.ToInt32(sqlDR["FuncNameID"]);
}

}
catch
{
intFuncNameID = 100;

}
finally
{
sqlDR.Dispose();
cnn.Close();
}
return intFuncNameID;
}


this is where the error is coming from...can you tell me what's the problem with this code?thanks again...

by the way, i'm calling that function in the main module..like so..
int intFunctID = cProc.getRequestedFunctionID(strFunctCode);
modified on Wednesday, April 21, 2010 4:58 AM

GeneralRe: Object reference not set to an instance of an object Pin
OriginalGriff20-Apr-10 22:59
mveOriginalGriff20-Apr-10 22:59 
GeneralRe: Object reference not set to an instance of an object Pin
Ice_Freez0520-Apr-10 23:04
Ice_Freez0520-Apr-10 23:04 
GeneralRe: Object reference not set to an instance of an object Pin
OriginalGriff20-Apr-10 23:33
mveOriginalGriff20-Apr-10 23:33 

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.