Click here to Skip to main content
15,903,362 members
Home / Discussions / C#
   

C#

 
GeneralRe: datepicker set unchecked Pin
Luis Alonso Ramos12-Apr-05 5:30
Luis Alonso Ramos12-Apr-05 5:30 
QuestionHow can I make a collection of multidimensional arrays? Pin
Member 17592949-Apr-05 1:00
Member 17592949-Apr-05 1:00 
AnswerRe: How can I make a collection of multidimensional arrays? Pin
S. Senthil Kumar9-Apr-05 3:04
S. Senthil Kumar9-Apr-05 3:04 
GeneralRe: How can I make a collection of multidimensional arrays? Pin
9-Apr-05 4:14
suss9-Apr-05 4:14 
Question.NET 2.0 WebBrowser Control??? Pin
Anonymous8-Apr-05 23:35
Anonymous8-Apr-05 23:35 
QuestionHow to view AutoCad file In C# Pin
Newbie_Toy8-Apr-05 23:16
Newbie_Toy8-Apr-05 23:16 
AnswerRe: How to view AutoCad file In C# Pin
Dave Kreskowiak9-Apr-05 5:41
mveDave Kreskowiak9-Apr-05 5:41 
GeneralError in OleDBConnection : Object reference not set to an instance of an object Pin
sksandz8-Apr-05 21:23
sksandz8-Apr-05 21:23 
I am running the following code. It executes when the value of variable i is 1 and when the loop continues and value of i becomes 2 i am getting error "Object reference not set to an instance of an object" in the cmdSearch.CommandText line in the code. . There is no problem with connection string. It successfully retrieves when i = 1. Can anybody help me out what is the problem. Please post with corrected code if anybody can help.
===========================================
for (int i=1; i <= objFolder.Items.Count; i++)
{
System.Data.OleDb.OleDbConnection odbSearch = new System.Data.OleDb.OleDbConnection();
System.Data.OleDb.OleDbCommand cmdSearch = new System.Data.OleDb.OleDbCommand();
odbSearch.ConnectionString = strConn;
cmdSearch.Connection = odbSearch;
item = (Outlook.ContactItem) objFolder.Items.Item(i);
string em = item.Email1Address;
cmdSearch.CommandText = "select * from Outlook_Contacts where FirstName='"+fn.ToString().Trim()+"' and LastName='"+ln.ToString().Trim()+"'";
odbSearch.Open();
OleDbDataReader rdrSearch = cmdSearch.ExecuteReader();
while( rdrSearch.Read())
{
RecordFlag = true;
}
odbSearch.Close();
}
===========================================
GeneralRe: Error in OleDBConnection : Object reference not set to an instance of an object Pin
big_trev8-Apr-05 21:58
big_trev8-Apr-05 21:58 
GeneralRe: Error in OleDBConnection : Object reference not set to an instance of an object Pin
sksandz8-Apr-05 22:04
sksandz8-Apr-05 22:04 
GeneralRe: Error in OleDBConnection : Object reference not set to an instance of an object Pin
big_trev8-Apr-05 22:15
big_trev8-Apr-05 22:15 
GeneralRe: Error in OleDBConnection : Object reference not set to an instance of an object Pin
Anonymous10-Apr-05 18:36
Anonymous10-Apr-05 18:36 
GeneralRe: Error in OleDBConnection : Object reference not set to an instance of an object Pin
mav.northwind8-Apr-05 22:40
mav.northwind8-Apr-05 22:40 
GeneralNeed Help Pin
Member 14597838-Apr-05 21:00
Member 14597838-Apr-05 21:00 
GeneralRe: Need Help Pin
Claudio Grazioli8-Apr-05 23:31
Claudio Grazioli8-Apr-05 23:31 
GeneralBuilding a Add-In for .Net Pin
vonhattruong8-Apr-05 20:13
vonhattruong8-Apr-05 20:13 
GeneralRe: Building a Add-In for .Net Pin
Claudio Grazioli8-Apr-05 23:37
Claudio Grazioli8-Apr-05 23:37 
GeneralRe: Building a Add-In for .Net Pin
11-Apr-05 19:25
suss11-Apr-05 19:25 
GeneralError while including .NET redistributable in setup program Pin
Rama Sharma8-Apr-05 18:30
Rama Sharma8-Apr-05 18:30 
GeneralRe: Error while including .NET redistributable in setup program Pin
mav.northwind8-Apr-05 19:33
mav.northwind8-Apr-05 19:33 
Generalsetup distribution without .NET framework Pin
Rama Sharma8-Apr-05 18:23
Rama Sharma8-Apr-05 18:23 
GeneralRe: setup distribution without .NET framework Pin
Dave Kreskowiak9-Apr-05 5:33
mveDave Kreskowiak9-Apr-05 5:33 
Generaldialing and answer telephone Pin
mehdipg8-Apr-05 17:45
mehdipg8-Apr-05 17:45 
GeneralRe: dialing and answer telephone Pin
Dave Kreskowiak9-Apr-05 5:22
mveDave Kreskowiak9-Apr-05 5:22 
Generallate binding - mscorlib error Pin
abandito8-Apr-05 13:11
abandito8-Apr-05 13:11 

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.