Doh. Of course. You don't format the display of a DataTable DataColumn, because it's never displayed. You format the display of the column in the DataGridView, in which the DataTable data is displayed.
Man, you don't do any table stuff for a year, and you forget everything.
While browsing the .Net Framework source code I saw many methods marked extern, but without a DllImport attributte. My question is how could I use the extern keyword that way and when is it useful (no documentation on msdn; the only thing I found is this post[^].
For example, in String.cs:
So: how do I have to setup the compiler to build a program which has some methods marked as "InternalCall", without making a separate unmanaged DLL library.
Another question is why VS won't download the unmanaged parts of a source code and forces as to search for them manually...
Greetings - Gajatko
Portable.NET is part of DotGNU, a project to build a complete Free Software replacement for .NET - a system that truly belongs to the developers.
While browsing the .Net Framework source code I saw many methods marked extern, but without a DllImport attributte. My question is how could I use the extern keyword that way and when is it useful
This is normally built into the assembly. I do not know the exact details, but I think the method body just refers to some unmanaged section of code. I think you can 'get this' by using the Managed C++ compiler.
From a webservice, is it possible to print out something directy to the printer? (Without showing the default internet explorer print dialog). I need that because a few barcode printers required data in a special format (usually an ascii sequence)
Sorry, I think my question was not good. My actual question is: Is it possible to print a line or something directly to a windows printer installed in the computer where the .aspx is been called? For example, If I make a webapplication, put a button on it and an event when the user clicks that button some text must be printed as it is, without the pre-formatation internet explorer does. If it's possible, how can I do that?
1) I need to create a webservice that should receive a file and some string data and then write to the response stream the results
2) The major problem: How to create a client software that uploads async a file to this webservice and gets the responde with the results? I think the WebClient class doesn't fit my needs, because it was suppose to upload the file quietly, gets the response (and it can be a big response) also quietly and after all that shows a message or write to the log file the results
I need to retrieve some information from a text file that basically consists of two columns of data in a tab delimited format. The first column consists of a unique identifier to lookup the main piece of information contained in the second column. This text file will consist of approximately 60,000 lines of data and I need to search through the text file in response to a particular event to retrieve the main piece of information from the text file using the unique identifier to search the file.
This search process needs to occur rapidly (t < 1 second). Is there a way to search a text file that rapidly? Alternatively, I could pull this information into an MS Access database (the database format used by my application) each time the user logs in to my application and perform a basic SQL query to retrieve the relevant information.
Any advice regarding the best method for searching this information (searching text file or importing text file data into database or some other method) would be appreciated.
The database option would be fine with me. I think that the text file that my application will be supplied with will be updated only once a day and my application is used throughout the day with only 1 or 2 log in events per 8 hour shift, so if I retrieve the information from the database only on log in, I should be OK.
Another question I have, though, is how to optimize retrieving the information from the text file. I would need some sort of BULK INSERT utility with MS Access. I know SQL Server has a BULK INSERT command, but unfortunately I do not have the luxury of using SQL Server at present. Is there a way to get the same functionality from Access?
Thanks, Luc. Yes, I understand that, but "my application" is not truly my application. I work for a company and they decide what database gets used. So, for now I'm stuck making this work with MS Access and need a solution using MS Access.
I also think that you should try sql server 2005.
Store your text files in the database and build some good search store procedures.
With C#,Trigger the SP on an event and display it in a datagridview object.
IMHO using a database is overkill for this application. A simple hash table will do the job easier and faster than a database.
1. Create a hash table with size around 120,000 (prime numbers work best).
2. Read (key, value) pairs from the text file and insert them into the hash table.
3. While you probably can't read and process a text file that size in under a second, you can retrieve an entry from the hash table in less than a hundredth of a second.
Thank you. That was the answer I needed. I have implemented the hash table into the application and it does the trick. The application I'm working with is well established and this particular feature, which happens to be a search for a serial number based on a bar code value, is a specific request by one customer. I can't redo the application simply to fit one customer need, and so I wanted something that works with the existing application architecture, which you have provided.
if you mean to reset the controls to its a default value for a property i.e Text you may follow this step
1. create list to buffer a property value for each controls in your form
2. get property value back to controls according its index