|
Without knowing more information what you want to do with the "converted" values and other restriction, it's hard to suggest any solution.
For instance,
1. You can have mapping tables and join them in your query.
2. You can have specialized custom control that do the "conversion".
3. If you are displaying them in a combobox, you can make use of the DisplayMember and ValueMember when you bind the property to it.
4. And of cos you can go and change the value yourself in the dataset, which probably is the least efficient way.
|
|
|
|
|
Hi,
I have tried and im successful in transferring a large file say 200mb to from server to client. but the problem is i get 100% CPU usage while the file is transferring.
if i have a file of 200MB, it will have 209715200 bytes; now to send this file, i first made partitions of 4000Bytes. If we take Mode of its total size with 4000, we'll get 3200Bytes remaining, and the rest of it remains 209712000 which is exactly divisible by 4000. What my program do is first it sends the 3200Byte chunk and then the remaining 209712000Bytes. If we divide 209712000 by 4000, we'll get 52428. Which means the loop will run 52428 times in order to send the whole file. And same goes on the server side when it is receiving the file. These loops make my CPU hit 100%. And if i push the whole buffer to the network it says the buffer is full and EXCEPTION. Please tell me a good solution to transfer file without using that much CPU. I'm making a file sharing server, if CPU will hit 100% on one client, i wont be able to support more than two client or even 1.
|
|
|
|
|
|
|
Hi,
I have a directory which contains multiple sub directories.
Inside those sub-directories are zip files protected by a password.
The password for all the zip files (156) are the same.
Is it possible with C# DotNet and the ICSharpZipLib to remove the passwords?
So not unzip it, only remove the passwords....
Any help would be greatly appriciated!
|
|
|
|
|
I see you asked this question in the SharpZipLib forums, that's probably your best bet.
As far as I'm aware, there isn't a way to do this. I think you need to create a new zip without the password.
Life, family, faith: Give me a visit.
From my latest post: "When Constantine severed the Hebrew origins of this faith in Messiah, a new religion was officially created. It is this religion that Orthodox Jews fear their relatives and friends becoming members of."
Judah Himango
|
|
|
|
|
Hello everyone,
I am using Windows Server 2003. When call the Start method of HttpListener, there is the following exception -- System.Net.HttpListenerException: Access is denied.
Any ideas how to grant the access?
thanks in advance,
George
|
|
|
|
|
You sure the port isnt in use already?
Are you running the HttpListener under sufficient privileges?
Are you trying to run this in an ASP.NET app?
|
|
|
|
|
Thanks leppie,
1.
I am sure the port is not in use by using netstat tool.
2.
I am running a Windows service application written in C#. I am using account "NT AUTHORITY\NetworkService".
3.
I am not writing ASP.Net, I am writing a Windows service application.
Any ideas?
regards,
George
|
|
|
|
|
George_George wrote: I am running a Windows service application written in C#. I am using account "NT AUTHORITY\NetworkService".
Try running it under an Administrator account if possible. I cant recall if NetworkService user has both listen and connect rights.
|
|
|
|
|
Thanks leppie,
I found when using administrator account to run the service, everything is fine. So I think it may be the issue of using NT AUTHORITY\Network Service account, which is not granted enough privilege.
Now I am going to try to reproduce this issue, my current question is, when assign the log-on account back to NT AUTHORITY\Network Service, and clicks ok in SCM, there is an error message which indicates me to input a correct password for NT AUTHORITY\Network Service.
But I do not know the password for this account. And I want to reset the password for NT AUTHORITY\Network Service.
How to reset the password for this account? Normally to any other account in the Windows server 2003? I have this question is because I noticed a couple of the Windows Services on my local computer is using this account to log on, I do not want to impact other services when changing the password for account NT AUTHORITY\Network Service.
Any comments?
regards,
George
|
|
|
|
|
Both the NT AUTHORITY\LocalService and NT AUTHORITY\NetworkService accounts are built-in accounts in Windows.
You can not use these accounts to log in to Windows and they not show up in the user management MMC snap-in.
These accounts have no password either, so when reseting the service to use the NT AUTHORITY\NetworkService just enter empty password.
|
|
|
|
|
Thanks Zoltan!
I have successfully set the account, cool! I have a further question, is NT AUTHORITY a domain setup on local computer, I have this question because I noticed that there is a sign \ after it like normal domain name.
regards,
George
|
|
|
|
|
It's the identifier authority (I didn't know that )
Take a look at this link[^] for a detailed explanation.
|
|
|
|
|
Really great! Thanks Zoltan!
regards,
George
|
|
|
|
|
Did you try Local System Account?
|
|
|
|
|
|
I suggested Local System account because it has full access to the computer.
Looks like the NT AUTHORITY\NetworkService has anonymous access to network resources and that is why it fails to create sockets.
|
|
|
|
|
|
I am using a CutomTask Pane in Excel as an C# .NET ADDIN.
The custom task pane has a close button(X) at the right corner.
I need to not allow the user to close the Task Pane or disable the Close button(X) . Can anyone have any idea ?
Is there any way to trap the close(X) button and prevent user from closing it ?
I tried to trap the VisibaleStateChange event handler of Custom Task pane and try to show it again when user clicks the X button. But I am not successfull.
I am using the CreateCTP() COM function to create a custom task pane.
Thanks,
Rajan
|
|
|
|
|
Hello,
When I'm placing ReportViewer on a from and design a report.rdcl for it, a BindingSource object is automatically generated for me.
However' when I place the ReportViewer on a UserControl, the BindingSource object isn't created and no report is displayed.
Is it a problem in my logic/code or is it a known limitation ... any how, if you have any kind of suggestions ... I'll be more then happy to listen
Thanks in advance
|
|
|
|
|
No data == no report. Did you expect something else?
Scott P
“It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.”
-Edsger Dijkstra
|
|
|
|
|
Hi.
Why are you picking on on words?
My real question was wether it was possible to put a reportViewer on a UserControl and how to make the BindingSource object to be created?
Thanks again
|
|
|
|
|
It is possible to put the ReportViewer on a UserControl, however I don't think it necessary as it already is a control. To bind to objects, you first have to have an object with the data that you want to display. Note that how you want to display the data has an impact on how you should construct the objects. I started with the display, then worked back to the objects that I needed to fill and then created FactoryMethods to process data in my application to fill those "report objects". In the example below, iData.GetHeader() returns a List<Header>. If you're still unsure, you should consider getting a book on report services, it's a broad topic with slim resources on the internet.
ReportDataSource rpd1 = new ReportDataSource("Logic_Header", iData.GetHeader());
ReportDataSource rpd2 = new ReportDataSource("Logic_DataA", iData.GetReportDataA());
ReportDataSource rpd3 = new ReportDataSource("Logic_DataB", iData.GetReportDataB());
viewer.LocalReport.SetParameters(GenerateGenrlReportParams(GetCorrectedFont(myFont)));
viewer.LocalReport.DataSources.Add(rpd1);
viewer.LocalReport.DataSources.Add(rpd2);
viewer.LocalReport.DataSources.Add(rpd3);
viewer.RefreshReport();
Scott P
“It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.”
-Edsger Dijkstra
|
|
|
|
|
Thank you for your answer, it helped (And I also found a mistake in my steps )
|
|
|
|