Click here to Skip to main content
16,011,585 members
Home / Discussions / C#
   

C#

 
QuestionTCP Connections and Threads Pin
SimpleData7-Nov-09 3:16
SimpleData7-Nov-09 3:16 
AnswerRe: TCP Connections and Threads Pin
Jimmanuel7-Nov-09 3:45
Jimmanuel7-Nov-09 3:45 
AnswerRe: TCP Connections and Threads Pin
N a v a n e e t h7-Nov-09 7:45
N a v a n e e t h7-Nov-09 7:45 
Questionhow to create database backup programmatically in mysql using c#.net Pin
gopal_bnvs7-Nov-09 1:54
gopal_bnvs7-Nov-09 1:54 
AnswerRe: how to create database backup programmatically in mysql using c#.net Pin
mihirpt1231-Jul-10 11:41
mihirpt1231-Jul-10 11:41 
GeneralRe: how to create database backup programmatically in mysql using c#.net Pin
Bhaumik Lathia17-Jun-11 23:39
Bhaumik Lathia17-Jun-11 23:39 
Questionget Datetime array through DataReader Pin
Mr.Kode7-Nov-09 0:09
Mr.Kode7-Nov-09 0:09 
AnswerRe: get Datetime array through DataReader Pin
N a v a n e e t h7-Nov-09 1:50
N a v a n e e t h7-Nov-09 1:50 
Mr.Kode wrote:
the reader works fine but the result is the last row only


Because you are overwriting the variable in each iteration. You need to get everything into an array and finally set to monthCalendar1.AnnuallyBoldedDates. Since you don't know the number of items, it is easy to use a List.
var list = new List<DateTime>();
while (rd.Read())
{
    DateTime ReservDays = (DateTime)rd["Reserve_Date"];
    list.Add(ReservDays);
}
monthCalendar1.AnnuallyBoldedDates = list.ToArray();
Your code can be improved further by calling Dispose() on SqlConnection, command and reader.

Best wishes,
Navaneeth

GeneralRe: get Datetime array through DataReader Pin
Mr.Kode7-Nov-09 2:06
Mr.Kode7-Nov-09 2:06 
GeneralRe: get Datetime array through DataReader Pin
N a v a n e e t h7-Nov-09 2:38
N a v a n e e t h7-Nov-09 2:38 
AnswerRe: get Datetime array through DataReader Pin
PIEBALDconsult7-Nov-09 3:26
mvePIEBALDconsult7-Nov-09 3:26 
Questioncall a c# funcation in html code Pin
saurabh8april6-Nov-09 22:23
saurabh8april6-Nov-09 22:23 
AnswerRe: call a c# funcation in html code Pin
Richard MacCutchan6-Nov-09 22:40
mveRichard MacCutchan6-Nov-09 22:40 
AnswerRe: call a c# funcation in html code Pin
OriginalGriff6-Nov-09 22:59
mveOriginalGriff6-Nov-09 22:59 
AnswerRe: call a c# funcation in html code Pin
Christian Graus6-Nov-09 23:36
protectorChristian Graus6-Nov-09 23:36 
GeneralRe: call a c# funcation in html code Pin
saurabh8april7-Nov-09 2:23
saurabh8april7-Nov-09 2:23 
AnswerRe: call a c# funcation in html code Pin
#realJSOP8-Nov-09 1:57
professional#realJSOP8-Nov-09 1:57 
Questionabout regular expression validation Pin
abolibapat76-Nov-09 20:59
abolibapat76-Nov-09 20:59 
AnswerRe: about regular expression validation [modified] Pin
Mohammad Dayyan6-Nov-09 21:22
Mohammad Dayyan6-Nov-09 21:22 
GeneralRe: about regular expression validation Pin
PIEBALDconsult7-Nov-09 3:27
mvePIEBALDconsult7-Nov-09 3:27 
GeneralRe: about regular expression validation Pin
Mohammad Dayyan7-Nov-09 4:03
Mohammad Dayyan7-Nov-09 4:03 
QuestionHow to get Word 2003's count of characters INCLUDING SPACES? Pin
@nisha 2n6-Nov-09 20:14
@nisha 2n6-Nov-09 20:14 
AnswerRe: How to get Word 2003's count of characters INCLUDING SPACES? Pin
Richard MacCutchan6-Nov-09 22:00
mveRichard MacCutchan6-Nov-09 22:00 
QuestionCapturing and redirecting all incoming IP packets using winpcap Pin
3bood.ghzawi6-Nov-09 20:02
3bood.ghzawi6-Nov-09 20:02 
AnswerRe: Capturing and redirecting all incoming IP packets using winpcap Pin
brickner26-Feb-10 6:18
brickner26-Feb-10 6:18 

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.