|
Dirso wrote: From a webservice, is it possible to print out something directy to the printer?
As long as your server has a printer it should work
|
|
|
|
|
Hi,
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?
Thanks,
Dirso.
|
|
|
|
|
Hi,
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
Thanks,
Dirso.
|
|
|
|
|
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.
Thank you.
|
|
|
|
|
Well, databases are optimized...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
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.
|
|
|
|
|
Hi,
there is a Microsoft SQL Server 2005 Express Edition which is free, and I trust a
better performer than Access is.
|
|
|
|
|
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.
Good Luck
|
|
|
|
|
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.
Thanks.
|
|
|
|
|
I did do a google search and looked at a few books but am stuck.
I have a form that I want to reset the text boxes on:
1) reset the text boxes within the group box
2) reset the whole form
tia!
shwaguy
|
|
|
|
|
shwaguy wrote: I did do a google search and looked at a few books but am stuck.
I have a form that I want to reset the text boxes on:
1) reset the text boxes within the group box
2) reset the whole form
Excellent - now what have you done so far? How far have you got with your code - or were you wanting us to write the code for you?
|
|
|
|
|
Thanks for the reply smart guy (AKA ass). Want a chance to redeem yourself?
What I am asking is a newbie question and I have no idea how to go about reseting a whole group of textboxes. Questions I have asked myself:
Is it possible?
Is it a built in function of the MS C# IDE like "groupbox1.child.text = ""?
looking for some help and not smart ass comments.
tia
shwaguy
|
|
|
|
|
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
sample
private ArrayList initialValues = new ArrayList();
private void StoreInitialValue()
{
foreach (Control ctl in YourForm.Controls)
{
initialValues.Add(ctl.property);
}
private void ResetToInitialValue()
{
for (int i=0; i< YourForm.Controls.Count; i++)
{
YourForm.Controls[i].Property = (typeof(your.stored.property.type))initialValues[i];
}
}
}
hope it helps
dhaim
programming is a hobby that make some money as side effect
|
|
|
|
|
thanks dhaim! I am going to give the code example a shot
|
|
|
|
|
Hi,
Does anyone know a free (or not too expensive) C# lib for fingerprint reading and comparation?
Thanks,
Dirso.
|
|
|
|
|
You might want to take a look at Windows Image Acquisition Library (WIA). I've only used it for document scans but it may have what you need for fingerprints.
If you're working with specific hardware, then you may want to check and see if the vendor has a C# library for their products.
|
|
|
|
|
I was looking to add in some simple word processing ability into my application. I need spell check and a few other simple things Microsoft Word does.
Does anyone know of a control / article that could offer any assistance here?
The less word automation needed, the better.
|
|
|
|
|
In .NET 3.+ WPF, spell-checking is built into either the textbox, richtextbox, or both. As for other capabilities their are a few articles on this site that can assist you. Do a quick search.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios
Discounted or Free Software for Students:
DreamSpark - downloads.channel8.msdn.com
MSDN Academic Alliance - www.msdnaa.com
|
|
|
|
|
check out visual studio office tools:
www.microsoft.com/downloads/details.aspx?FamilyId=5E86CAB3-6FD6-4955-B979-E1676DB6B3CB&displaylang=en
You got a version for VS2005 (.Net 2.0)
and a version for VS2008 (.Net 3.5)
Using these tools you can write add-ins to word and/or use word's controls.
besides that, if you like you can automate/control word application itself using office interop (just google it). meanning, you can automate real instance of word to do things for you...
|
|
|
|
|
Hi Guys
I want to convert the pdf file to txt file. I'm using this code
private static string parseUsingPDFBox(string input)
{
PDDocument doc = PDDocument.load(input);
PDFTextStripper stripper = new PDFTextStripper();
return stripper.getText(doc);
}
but it throw this exceptions
IOException was unhandled
Error: Header is corrupt ''
Please Help
|
|
|
|
|
|
Hi all,
I need to call a business logic class via web servicing without using reflection. I pass the class name and method as string parameters in the web service. But it doesn't work the conversion from string to an object.
If I pass the object class then it works but I don't want to do that as the webservice must run independently
The code I use is,
[WebMethod]
public object ExecuteMethod(string ClassName, string MethodName, params object[] arguments)
{
object obj = null;
Type type = Type.GetType(ClassName);
try
{
obj = type.InvokeMember(MethodName, BindingFlags.Default |
BindingFlags.InvokeMethod, null, null, arguments);
}
catch
{
throw;
}
return obj;
}
Thanks in advance
|
|
|
|
|
ClassName need to be a fully qualified type name.
BTW: what you are doing is reflection
|
|
|
|