|
you can change the mysqldump file path like
C:\wamp\bin\mysql\mysql5.1.36\bin\mysqldump
for the using wamp server;
|
|
|
|
|
what is the use in Xampp server
|
|
|
|
|
hello all
i want to know how to get DateTime array through DataReader and set it as bolded Dates on MonthCalender
i have the following code ..
SqlCommand GetDates = new SqlCommand();
GetDates.Connection = new SqlConnection(ConS);
GetDates.CommandType = CommandType.Text;
GetDates.CommandText = "select Reserve_Date from reservations where Done = 0";
GetDates.Connection.Open();
SqlDataReader rd = GetDates.ExecuteReader();
while (rd.Read())
{
DateTime ReservDays = (DateTime)rd["Reserve_Date"];
monthCalendar1.AnnuallyBoldedDates = new DateTime[] { ReservDays };
}
rd.Close();
GetDates.Connection.Close();
the reader works fine but the result is the last row only
i want to get all rows and set it as AnnuallyBoldedDates on monthCalender
thanks in Advance
|
|
|
|
|
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
|
|
|
|
|
thanks Navaneeth
this really helps
but how Dispose method improve performance?
|
|
|
|
|
Performance is not the reason to call Dispose . It avoids resource leaks. When you dispose your connection properly, ADO.NET's connection pooling can work efficiently. Here is a decent article on the subject : Implementing IDisposable and the Dispose Pattern Properly[^]
Best wishes,
Navaneeth
|
|
|
|
|
Your statement "monthCalendar1.AnnuallyBoldedDates = new DateTime[] { ReservDays };" recreates the array on each iteration.
And also, the statement "DateTime ReservDays = (DateTime)rd["Reserve_Date"];" is needless.
I also recommend using a try/finally, with the rd.Close() in the finally. And a using statement for the connection.
|
|
|
|
|
how do i call a c# funcation in html code, on link's onclick?
i have already called a function onclick, i need to call another function.
kindly help me out....
Thanks
Saurabh
|
|
|
|
|
Assuming I understand your question you just need to name the second function as something else, e.g. OnClickTwo() .
btw please do not use bold font for your question.
|
|
|
|
|
Firstly, try such questions in the ASP.NET forum - you are more likely to get usefull replies.
I assume you are trying to call a C# function in the code behind (server code)? In which case just make the link runat="server" and the onclick event should pick up C# code.
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
As someone else said, we have an ASP.NET forum. I hate to say this, because it's a library overused by all sorts of clueless people, but AJAX may be what you're looking for. The alternative is simply to have a server control call a code behind method and do a postback.,
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
thanks everyone..........for ur support.
|
|
|
|
|
saurabh8april wrote: funcation
Excuse me, but BWAAAA-HA-HA-HA-HA! My sides hurt! You guys slay me!
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
gud afternoon
i have a problem
i have a taextbox and i want to enter in it only 2 digits or 11 digits
example
12 valid
123 invalid
12345678912 valid
123456789123 invalid
plz. rply its urgrnt
|
|
|
|
|
You don't need Regex(Regular Expression)
Use can use Leave event :
private void textBox1_Leave(object sender, EventArgs e)
{
if (textBox1.Text.Length != 2 && textBox1.Text.Length != 11)
throw new Exception("invalid");
}
modified on Saturday, November 7, 2009 10:03 AM
|
|
|
|
|
I think you want an && , not an || .
|
|
|
|
|
Yeah, You're right. Thanks
|
|
|
|
|
hai......
help me plz...i done this prob ..but that count nums displaying in same in file path....i want to dispaly in saparate path ....
i took paths lik..|sno|filename|count|...........n i take multiple files which is displaying in sno....but char count was nt dispalying in count path.......its displaying in filename path...
plz help me how can i get that count in next path....?
thanquuu.
|
|
|
|
|
What on earth does this mean?
Try to clarify your problem and spell words in full, please do not use 'txtspk' it makes you question look like gibberish.
|
|
|
|
|
Hiii all..........
I need helping if you don't mined that >>> i think you don't mined ............
How i can use "winpcap" or "sharpcap" to capture and redirect all incoming packets using C#.net windows application ???????????
|
|
|
|
|
Have you tried Pcap.Net?
http://pcapdotnet.codeplex.com
|
|
|
|
|
Hi
How are you
I have a questio
How i can load image on Asp.net with c#?
|
|
|
|
|
We have an ASP.NET forum, and the answer has nothing to do with C#, as it happens. You just put an image tag on your page and point it to the URL of the file on your server.
If you meant something more complex, please ask more clearly in the correct forum.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
what is the procedure for connecting sql server databsae in c# ,
i want display data in textbox,i also display max value in row in the textbox
modified on Saturday, November 7, 2009 1:52 AM
|
|
|
|
|
What do you mean by page, is this an ASP.NET question ? What have you tried ? Is this for a class, or for your paid job ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|