|
This has to be slow. Dbf files dont have a very good performance and copying all this together for just some queries is probably a bit overhead.
Some hints you might try out:
1. Try out the Visual Fox Pro Ole Db Provider. It can be found somewhere on MSDN. I dont know it but its probably faster (I used it once and never had performance issues).
2. What kind of report are you making? Do you really need one big DBF file? Consider getting all data at once into one DataTable and then calculating whatever you need on this DataTable . You can use the UNION ALL statement to get all tables in one statement:
Select TYPE,EMPLOYEE from MyDbfFile1 UNION ALL Select TYPE,EMPLOYEE from MyDbfFile2 UNION ALL Select TYPE,EMPLOYEE from MyDbfFile3 ...
3. Use some real Database
|
|
|
|
|
thx man
i used UNION ALL STATMENT a lot faster than reading DBF files one by one and adding Records.
this code is with loop
string ITMConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Application.StartupPath + ";Extended Properties=dBase IV";
OleDbConnection ITMConnection = new OleDbConnection(ITMConnString);
string ITMSelectQuery = "Select * from "+ALOHA_PATH+"\\GNDITEM.DBF UNION ALL Select * from "+ALOHA_PATH+"\\"+datefolders.ToString()+"\\GNDITEM.DBF" ;
MessageBox.Show(ITMSelectQuery);
OleDbDataAdapter da= new OleDbDataAdapter(ITMSelectQuery ,ITMConnection);
da.Fill (dsrefresh,"GNDITEM");
dv = new DataView(dsrefresh.Tables["GNDITEM"]);
dataGrid1.DataSource = dv;
ITMConnection.Close();
i have a small problem to generate a report out of dataset, before i was using the main DBF to Generate Report. how can i solve this problem.
|
|
|
|
|
What do you mean with 'report'? Crystal report? If yes Im sorry to say I dont have much knowledge in making crystal reports
I can only help you if you state how your report creation functions so far. That includes what kind of report you are creating, what data it should present and how you currently bind the datasource to it.
|
|
|
|
|
Yup i want to Create a Crystal Report,
can i create a DBF file from my DATASET , if yes, then i can easily create a Crystal Report.
i tried to create a blank report, then set Report data source to DATASET but it didn't work.
thx Robert
|
|
|
|
|
As I said I have no experience with Crystal Report. But a quick googling showed up this.
It basically says you have to bind your report at design time to a XSD schema file and then bind the DataTable at runtime.
Hope this helps.
|
|
|
|
|
dataset i created with some merges, i want to put that dataset into another empty database that has the same datastruture already.
|
|
|
|
|
Is it possible to automatically set up a default "shortcut key" for a C# application at the time of its installation on a user machine, so that the user could launch the application by directly using the shortcut key combination such as ctrl + alt + S.
|
|
|
|
|
windows has a hot key registration process. Try the link below:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/hotkey/hotkey.asp
|
|
|
|
|
g'day folks,
well i am stuck on a problem with regards to obtaining security permissions on folders. At the moment I have created a simple treeview example which shows all sub-directories in a tree form for a particular directory.
Then I wanted to see how the application would handle a sub-directory(test1) if the current user logged on win2k box didnt have the permissions to access test1. The application throws an exception which somethign along the lines of unauthorized access etc. I changed the permissions for test1 by right clicking and accessing the security tab.
I did some googling and came across couple of links on NTFS security permissions in .NET.
http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=e6098575-dda0-48b8-9abf-e0705af065d9
http://weblogs.asp.net/cumpsd/archive/2004/02/08/69403.aspx
My problem is that I am having a hard time understanding those links. Does anyone have an alternative tutorial that would explain things a lot clearly interms of say obtaining the current ntfs security permissisons for a selected folder ?
thanks
|
|
|
|
|
Hello!
I am using the HttpWebRequest and HttpWebResponse classes to retrieve data from a web site which is UTF8 encoded. I am using a StreamReader which I have set to UTF8. When I read the stream into a string using ReadToEnd the UTF8 characters do not appear in the string when I debug. Instead it results in \0\0\0, null characters representing the UTF8 characters. As far as I can tell every medium used is Unicode friendly. Does anyone have an idea of what may be wrong?
I have searched the newsgroups as well as codeproject.com, but have found nothing. Thank you.
-Dan
|
|
|
|
|
What is the difference (pros and cons) between retrieving data from the web
using System.Web.WebClient and using HttpWebRequest and Response to get the
data? The WebClient download methods seem to neatly encapsulate the multiple
steps (request.Create; request.GetResponse; response.GetResponseStream ...)
required with the traditional HttpWebRequest/Response approach. I am trying
to crawl urls and download data.
|
|
|
|
|
Hi Jason,
As you already know that the WebClient class in fact uses the WebRequest internally to make a connection to the remote resource, and the HttpWebRequest is just a descendant of the abstract basic WebRequest class. The way I see it is the WebClient class provides the user with an easy and simple way to connect to request data from the remote resource, because it encapsulates the basic steps which you should have to do by yourself if you use the WebRequest. However, with the WebRequest and its descendants you will have more control to handle the way to request data from the remote resource. For more information, you can see Requesting Data[^]
|
|
|
|
|
Hi,
I wrote an application that has a server application running on a machine as a console application. The problem with this is that the machine must be logged in for the program to work. The client does not want this. The console application monitors port 8080 and process's and returns data from an SQL server database.
What can I convert the server application to that would allow it to run without the computer being logged in?
Thanks.
Stephen
|
|
|
|
|
A Windows Service... check the C# programming page under Services section for some good tutorials.
[EDIT: check here[^].]
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
Hello,
I'm trying to print on some pre-printed receipts, where I only print the values of the fields. I get the unprintable area using GetDeviceCaps and use hundreths of an inch to position each field. Everything was working fine in my printer, but today I moved to my client's office to prepare for deployment, and when I tried to print in their laser printer, the first receipt came all right.
From then on, every receipt only printed the left half. I tried another printer, and PDF Creator, and same output.
I noticed on one of the printed sheets that the widht from the border of the page to the end of the printed area is 8.5 centimeters. It rings a bell because the page is 8.5 inches wide.
I checked the PageUnit property of the Graphics object that I use to print in my PrintPage event handler, and it's set to Display (1/75 of an inch).
I'm really !!
So, any help??
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
I think I've found something that is going wrong. I explicitly set the PrintDocument.DefaultPageSettings.PaperSize property to letter before printing, and in my PrintPage handler, it is set to A4.
I during the Print dialog, I go to printer properties and change the paper to letter, it prints all right. But not automatically, even if it's set as the default paper size for the printer, and explicitly set for the document.
What still puzzles me is that the printed area is exactly 8.50 centimeters wide.
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
Hi,
Have anybody tried inheriting from CommonDialog class
I want to know, how to implement the RunDialog() function
in my derived class?
Thanks
|
|
|
|
|
I have a standard application with an installer that deploys to a user-specified directory. I have also written plugins to the application that can be deployed individually as required. The only problem is that the plugins need to be dropped in the same directory as the original application installation directory.
How do I write an MSI in visual studio .net that installs the plugin in the same directory WITHOUT the user having to choose the application installation directory?
Essentially, the msi's only function will be to drop a single dll into the application install directory.
|
|
|
|
|
As a first step you can check for it's path at the regisrty in :
HKLM\SOFTWARE\MICROSOFT\WINDOWS\CURRENT VERSION\UNISTALL\ [Your Application Name].
Or If you want it also to be in a specified location :
In the setup project ckeck the steps that the setup will perform and then ,delete the step that the user chooses in it the folder ,so it will be installed to the default directry : WinDir\Program Files\Your Company Name\Your Application Name\...
|
|
|
|
|
This will work only, if the main program was installed at the default location...
Regards,
mav
|
|
|
|
|
That's quite simple.
Your plugin installer will have to know the path your main app has been installed into.
You can set a registry entry during installation of your main app to hold this information by setting its value to "[TARGETDIR]".
In your plugin installation project, you can add a registry search to your start conditions that's searching for this registry entry.
If the search found a value, assign this value to a variable, e.g. MAININSTALLDIR.
Now set the default value for the installation directory to [MAININSTALLDIR] and remove the dialog where the user can choose the installation location and you're done.
Regards,
mav
|
|
|
|
|
How do i set the [TARGETDIR] after I get the value from the registry?
|
|
|
|
|
Go to the file system editor, select the application directory and enter [MAININSTALLDIR] (resp. the name for your variable) for DefaultLocation (the standard value is [ProgramFilesFolder][Manufacturer]\[ProductName], but you want the directory you found in the registry).
Regards,
mav
|
|
|
|
|
I have an Xml document which I am trying to load via XmlDocument.LoadXml(...). However, the document has é and â entities in them. How can I make the XmlDocument resolve these? Editing the original xml document is not an option.
Is there some way to give the XmlDocument a list of entities before Loading the xml document?
Thanks,
...Matt
|
|
|
|
|
The é and ê should have been é and &circ.
...Matt
|
|
|
|