Hi there,
I have a following question and it is related to vfp. I created a form method called AddInvoiceToPri ntQueue.
The following is the code i added.
[HTML]LPARAMETERS tinvoice_id, tinvoice_no, tuser_id, tcomputer_name
INSERT INTO <PrintQueueTabl e> ;
(invoice_id, invoice_no, user_id, computer_name, status_id);
VALUES;
(m.tinvoice_id, m.tinvoice_no,...
User Profile
Collapse
-
Visual FoxPro Project help
Hello All,
I am new to database development. I am working on a pre-existing database application in VFP generates invoices for various templates and then print them. Once you click on the issue button, invoices get generated for the specified templates and then they are automatically printed out. What is happening is that when you issue the invoices...proc ess gets slow and it takes time for the invoices to get printed out. I was thinking... -
random numbers
The following code is generating files perfectly, But when i change the date on my laptop to get files with different modified times. It just overrides all the files with the recent date.
Code:private void GenerateTestFiles_Click(object sender, EventArgs e) { StreamWriter outStream = null; string message = null; for (int i = 0; i < (100);
-
okay. So, for exceptions..I can give out the same message
for example
Code:catch (FileNotFoundException e) { message = "Unable to delete " + filePath + "\r\n"; message += String.Format("Reason: {0}", e.Message); MessageBox.Show(message); } catch (DirectoryNotFoundException e) { message = "Unable to delete " + filePath + "\r\n";
-
I just want to know what exceptions i can use and how...thats why i have catch block emptyLeave a comment:
-
C#: Exception handling
Hi All,
I can't find any good examples of throwing exceptions. I have the following code. I want to include all the possible exceptions i can. Help me out on this. I am just moving away from console object and moving towards exception object.
Code:public int DeleteFilesOlderThan(int Days, int Hrs, int Mins, string filter) { DateTime dt = GetRelativeDateTime(Days, Hrs, Mins);
-
How do i use the following code to create files with different filter?
Code:private void button1_Click(object sender, EventArgs e) { StreamWriter outStream = null; string filename = "output.txt"; string message = null; for (int i = 0; i < (1000); i++) { try
Leave a comment:
-
C#: generating random files
Hi All,
Can anyone help me with a method that could generate random dummy files with extensions..(.t xt, .log, .exe) in a specified folder? -
C#: help with coding
Hi All,
I have the following class which deletes files older than X number of days and with specific extension. I dont see any error in the code from my point of you. Please, can anyone double check for me because when i m debuging it, files are not getting deleted. Thanks:)
Code:using System; using System.IO; using System.Collections; namespace Files_ExtLib1 { public class FolderWatcher
-
i put a breakpoint to check it throughly. this is the FolderWatcher.c s class. I modified the code using DateTime object. I think FolderPath is not defined in the current directory
Code:using System; using System.IO; using System.Collections; namespace Files_ExtLib1 { public class FolderWatcher { string m_FolderPath; public FolderWatcher()
Leave a comment:
-
I created three textboxes to enter days, mins, hrs and a combo box for extension on my form.
this wouldn't work?
Code:private void DeleteFiles_Click(object sender, EventArgs e) { FolderWatcher fw = new FolderWatcher(); fw.FolderPath = @"c:\csharp"; // FolderName OpenFileDialog OpenFileDialog1 = new OpenFileDialog();
Leave a comment:
-
okay i will check that out.......i want to know another thing. I wrote the following code to create text files and to create multiple text files i guess i can run the code in a loop. but i want to generate dummy files using .txt, .log, .exe file format in button GenerateTestFil es eventhandler
Code:using System; using System.IO; class FileTest { static void Main() {
Leave a comment:
-
-
okay i did some modification in my class...but its not deleting specific files from event handler...
[Code]
using System;
using System.IO;
using System.Collecti ons;
namespace Files_ExtLib1
{
public class FolderWatcher
{
string m_FolderPath;
public FolderWatcher()
{
//
// TODO: Add constructor...Leave a comment:
-
Before when i was compiling the application, it was showing in pending checkins that files successfully deleted. but not anymore:SLeave a comment:
-
can you check if this is coded properly using date time object
Code:public static DateTime GetRelativeDateTime(int days, int hours, int minutes) { return DateTime.Now.AddDays(-days).AddHours(-hours).AddMinutes(-minutes); } public int DeleteFilesOlderThan(DateTime dt) { string[] older = FilesOlderThan(dt);
Leave a comment:
-
Thanks, But when i debug the application, the files get deleted but i dont see the msg showing Files successfully deleted.Leave a comment:
-
C# App: Exception Handling
Hi All,
Is it the right way of handling exception in a method?
Code:public int DeleteFilesOlderThan(int days, int hrs, int mins) { string[] older = FilesOlderThan(Days, Hrs, Mins); int count = 0; foreach (string file in files) { try { File.Delete(file);
-
Are you only allowed to define one pattern? ie, "*.txt"? Or
can you define multiple patterns? ie, "*.txt; *.exe; *.log"?Leave a comment:
-
I checked this peice of code using cosole application and it worked. I used a different coding method though. This is the class that monitors and deletes Files older than X number of days
Code:using System; using System.IO; using System.Collections; namespace Files_ExtLib1 { public class FolderWatcher { string m_FolderPath; public FolderWatcher()
Leave a comment:
No activity results to display
Show More
Leave a comment: