|
<quote>*Contents of removed message*
i created mysqldump application using C#. it is saving to some path which i given. but how to make that application to save automatically like every 3 or 4 hours daily. i written code like below
public void Dump()
{
try
{
DateTime Time = DateTime.Now;
int year = Time.Year;
int month = Time.Month;
int day = Time.Day;
int hour = Time.Hour;
int minute = Time.Minute;
int second = Time.Second;
int millisecond = Time.Millisecond;
string path;
path = "E:\\BackupMysql1\\" + year + "-" + month + "-" + day + "-" + hour + "-" + minute + "-" + second + "-" + millisecond + "_temple.sql";
StreamWriter file = new StreamWriter(path);
ProcessStartInfo psi = new ProcessStartInfo();
psi.FileName = @"C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqldump";
psi.RedirectStandardInput = false;
psi.RedirectStandardOutput = true;
psi.Arguments = string.Format(@"-u{0} -p{1} -h{2} {3}", "xyz", "abcd", "localhost", "database");
psi.UseShellExecute = false;
Process process = Process.Start(psi);
string output;
output = process.StandardOutput.ReadToEnd();
file.WriteLine(output);
process.WaitForExit();
file.Close();
process.Close();
}
catch (IOException ex)
{
MessageBox.Show("Error , unable to backup!");
}
}
anybody knows please reply me.
*End*
The easy way to do this is to use a scheduled job in the windows scheduler that is set to run at a set interval. Don't muck about attempting to write code to do this when the OS provides a perfectly serviceable method.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
modified on Friday, August 13, 2010 12:24 PM
|
|
|
|
|
Hello,
I have a special requirement where I need to show grouped data in expandable form. For eg:
Order Date Total Amt
+ 1 05/06/2010 100.00
Item Qty Rate Amt
A 5 10 50.00
B 2 25 50.00
This format we normally see in Access when the data is grouped or a primary key of table A is the foreign key of table B. If I clikc "+" sign next to order #, I get to see the item details belonging to that order. If the order is already expanded "-" sign lies and if their are no item details pertaining to any order their should be no sign.
I know I can do this format using Tree, but that looks too off profesional.
Can you suggest me any idea to implement this using Vb.NET.
Thanks,
Thanks & Regards,
|
|
|
|
|
|
Thanks.
But I need it for VB.NET application and not a web application. It doesn't seem that I can use this component in Vb.NET desktop application. Any idea or suggestions are welcome.
Thanks & Regards,
|
|
|
|
|
Perhaps you should have specified the technology was Windows not Web.
There are plenty of examples here. Like this one, Collapsible Panels in VB.NET[^]
All Time Programming wrote: I need it for VB.NET
Not every example will be in VB.NET and you should learn to read and understand other languages and how to translate it to your needs.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Thanks alot, Mark.
Your links answered my query much better. Thanks once again.
Yes Mark, I can read and translate from any to any among C#, VB, Java. But needed some guideline for start up also.
Thanks & Regards,
|
|
|
|
|
Hi,
Is it possible to compare two excel sheets ie column names in each sheet by using SSIS package?
Need some urls or some examples
Notify user when there is no matching in column names and exlude that file and pick the next excel file placed in server.mappath.
Thanks
Guhananth.S
|
|
|
|
|
Stop posting and read the guidelines
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hi,
In SSIS is possible to check
a) Excel template check ie comparing the column names of each sheet with another standard sheet
The SSIS must check if the uploaded excel is matching the standard excel.
b)The SSIS must pick any excel sheet placed in server.mappath ie able to pick any excel file names.
c)Also the SSIS must read the excel sheets and port data to respective tables.
How to do?
How to do these tasks in SSIS package.
If we deploy this,will the package check excek sheet format and notify admin,if any things goes wrong.
Thanks
S.Guhananth
|
|
|
|
|
|
Please read the guidelines[^] and don't use capitals for your entire message. Also please clarify what your quesstion has to do with the .NET framework.
It's time for a new signature.
|
|
|
|
|
HI,
How to create SSIS package in VS 2010
which option we need to choose
guhananth.S
|
|
|
|
|
You cannot create an SSIS package in VS 2010. The installation of SQL Server 2008 can install the Business Intelligence Development Studio (BIDS) which is a variant of VS 2008. BIDS provides the templates and capability of creating and deploying SSIS packages
|
|
|
|
|
I'm not sure this is the right place to ask this question. We are currently using Visual Source Safe and VS 2002/2003. We are looking to upgrade to Visual Studio 2010. I need to know if Visual Source Safe will work with VS 2010 or do I need to move to Team Foundation Server? And does Team Foundation Server come with VS 2010? And what are the pros and cons of using one over the other?
And before any one suggest a different version control software package, that is not an option. I work for a university and with our licensing agreement I have to go with one or the other.
Thanks,
Carolyn
If you can’t have fun at work, then why go to work?
|
|
|
|
|
VS2010 will work with VSS. TFS does not come with Visual Studio, it is a separate server that VS connects to via the Team Explorer.
As for the pros and cons of each, that would entail a long and, for some, hated debate. There is plenty of information available that describes TFS. Essentially though if you have a small team of developers, three or less, then VSS will probably work best for you. However, if you want to including continuous integration builds, work item tracking, etc. then TFS is the tool.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Will VSS need to be upgraded? The version is probably as old as my VS. This was the setup when I came on board a couple of years ago and I'm just now getting the okay to upgrade so I want to get everything that possibly needs done at once. It'll probably be another six or eight years before they upgrade again. This department is not very good about being on the cuttng edge or even at the front of the pack.
Thanks for replying.
Carolyn
If you can’t have fun at work, then why go to work?
|
|
|
|
|
VSS should be fine, it hasn't been updated in years anyway. Given that it may be a very long time until you have budget to upgrade again I would certainly go with TFS. In another few years VSS probably won't be supported or won't meet your needs. TFS is very extensible so it can keep pace with you. Also, there are feature that you will probably find very useful, if not now, certainly in the future.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
I'll take a further look as TFS then. Thank you for your assistance.
Carolyn
If you can’t have fun at work, then why go to work?
|
|
|
|
|
|
Cruise Control works and nAnt work with VSS.
|
|
|
|
|
Get TFS. I agree it's overkill for small teams, but given your microsoft only constraint and the fact that VSS is slated to be obsolete in 2011, you might as well bite the bullet and get TFS. I admit, it's not the easiest beast to learn (especially coming from SVN), but if schedule 2 weeks for learning as part of the upgrade, you'll become a master.
|
|
|
|
|
PMFBI but I can offer some thoughts as one who manages a small development team, and has used TFS and VSS for several years. We use VS2008 Team System for developing and maintaining a fairly large project (>1million lines of C# code) and VSS for maintaining 'legacy' projects, because that's where they started off.
TFS brings much more than source control. On that feature alone it is far superior to VSS (I can't speak for CVS, SVN etc because I haven't used them). In my experience VSS is fine for smaller projects, and where you can ensure that only one developer at a time ever works on a file. With a big project that is often inconvenient and not easy to regulate (and why should you have to?) and TFS's far superior checkin/merge facility helps manage that relatively safely. Given the chance, of the two I would use TFS source control for any non-trivial project employing more than one developer.
TFS also brings programmed testing (MSTest unit testing and we also use Selenium), test code-coverage, integrated bug and task tracking, integration with Sharepoint for project documentation control and publishing, and the biggie for me is automated builds. It took us a while to get to where we are today, but I wouldn't be without our CI and nightly build/test/document process. Several times a day and every morning I get an email confirming that all is well, or early warning that something has unexpectedly broken. It's not perfect because you can never have enough tests, but I sleep much better at night as a result.
That is not to say that TFS and VS20008 are without their problems. Check-in merges (and branch merges) can get confused and you have to keep your eye on the ball when you do it, but you do get the option to select individual differences if you want complete control. I have found that frequent 'gets' to keep the local copy up to date together with frequent check-ins of changes is a good way to proceed with multiple developers on the project. In other words don't let server and local code drift too far apart, to keep the risk small. The bug/task tracking facilities could be usefully improved (reporting, especially, is a bit clunky - was it designed by the office junior?). VS2008 itself struggles with largish applications and can often 'lose' the various tools such as call-stack, watch windows etc, which for no apparent reason will be blank panes. Frequent restarts of VS2008 are essential, we find, to correct this. It seems to be a memory thing, and we are at the 4Gb limit already on our workstations, with dual core processors. In this respect it's a typical MS beast, sad to say.
TFS lacks the ability to insert version history into the source code in the way that VSS can, but frankly, I've never missed that and find the code is neater without endless pages of check-in history comments. The separate check-in history viewer that VS2008 makes available seems, to me, to be quite elegant, especially as it is integrated with changesets so you can easily see and view all the changes that were made, as a group, and you can do this from a bug report too, drill down and see all the code changes that relate to that particular fix. Neat.
TFS itself can be very slow at times - again for no apparent reason, even though we have a dedicated server which is, in network terms, practically in the same room. Some or all of these shortcomings may have been addressed in VS2010 Team System - upgrading isn't an option for us, given the huge cost, so I haven't bothered investigating.
But for all that I would say it's much superior to VSS for source control, and brings a lot of extras that, once you have them, you would probably never wish to be without.
I have to say I find it sad that your university is restricting you to proprietary software (or so your remarks suggest). You'd think they would be gagging to save money wherever they can. Have the suits truly taken over the asylum?
HTH
Neil
(Disclaimer: this was written in my personal capacity and does not necessarily reflect the views of my employers)
|
|
|
|
|
I'd strongly urge looking at other (often free) alternatives like Subversion.
Subversion has strong support in Windows - Tortoise SVN provides explorer shell integration and Ankh SVN provides Visual Studio integration.
|
|
|
|
|
I'll second the vote for SVN. My limited exposure to TFS is that it attempts to incorporate source control in the karma of the large team. If you only have a few developers, it's serious overkill.
<ducking> - am I wrong?
Read about VSS' limitations. Sometimes they won't hurt you.
Charlie Gilley
<italic>You're going to tell me what I want to know, or I'm going to beat you to death in your own house.
"Where liberty dwells, there is my country." B. Franklin, 1783
|
|
|
|
|
Perhaps you didn't read the OP closely enough,
"And before any one suggest a different version control software package, that is not an option."
Your answer is a useless waste of time.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|