|
In my report, I added two different fields from two different datatables =First(Fields!NameOne.Value, "TestDataSet_TestDataTableOne") and =First(Fields!NameTwo.Value, "TestDataSet_TestDataTableTwo"). The result shows one row and no NameTwo is displayed. Then I changed the field as
=Fields!NameOne.Value,=Fields!NameOne.Value. Then error occured.
How can I display Both fields containing the selected data in Both datatable. Can anybody help me???
|
|
|
|
|
Recommendation for FTP/SFTP/FTPS component in C#?
Commercial/Open Source both good, any suggestion guys?
|
|
|
|
|
|
I used the following for one project.
http://www.weonlydo.com/FtpDLX.NET/ftp-sftp-ssl-net.asp[^]
I researched a number of products (looking for free and commercial) several years ago and ended up with this one. As I recall I selected it due to price, licensing and features.
I don't recall any problems with actually using it nor with figuring out how to use it.
|
|
|
|
|
This is my version of another guys code (hartertobak) in which he shows us how to use google to get the pagerank. I really liked this code and have really been looking for it BUT there needed to be some modifications to the code before it could be used for batch processing. So i made some simple but effwctive mods to his already beatiful code.
The initial idea was wonderful and worked perfectly if you only wanted to do 1 or 2 URLS but was useless for batches of urls (urls in their thousands) because google will block pagerank requests for sites from the same ip if they have a frequency of less than 1 second (ish) so i had to come up with a way to stop that happening. When i heard of this problem the first thing i did was to put a 10 second sleep between every submission. This meant that google wouldnt pick up this as a bot making the submissions since a human could quite easily make a request to google every 10 seconds.
The next thing after that was to bring in file handling and an interface so that the user could interact with the program. My first idea for this would be to import a .txt file. That way a file could be made and saved for later use and would mean not having to enter the urls one by one. Of course the user could do this but still have the flexibility to add more after it has been loaded.
The HCI is VERY simple and basic. It is a listbox with a few buttons. The listbox is the main display. and the buttons are the controls. There is a textbox for inputting urls and some error handling with the textbox but it is assumed that the user has knowledge of what he/she is doing. every url must begin with http:// and contain at least 1 dot (.)
So now i had a working program but there remains one problem. Time. The 10 second delay cannot be helped but the way i made that happen was to use Thread.Sleep which meant that the program is unresponsive. How do i make my program responsive while waiting those 10 seconds and display the results in real time?
Any help appreciated
jimbo8098
|
|
|
|
|
any real work (or sleep) that takes more than a few tens of milliseconds should be delegated to one or more separate threads; if the work load is light and the latency small (again, milliseconds; yours isn't) you could organize it with a timer.
Study the BackgroundWorker (that is actually a thread) and don't you touch any GUI (HCI?) thingies from within its DoWork handler! Use the ReportProgress/ProgressChanged stuff if you must.
PS: you're lucky I read your entire message up to the end, I didn't see a question coming any time soon!
|
|
|
|
|
Thanks for replying. I wanted to give some info rathjer than just ask my question and get on with it XD
Ok I'll have a look at that...
|
|
|
|
|
That worked fine. Didnt use it in this yet but i used it in another similar program which would just stop running and it worked fine Thanks
|
|
|
|
|
You're welcome.
|
|
|
|
|
The default way from documentation states:
static void SetFolderPermission(string folder, FileSystemRights fsRights, IdentityReference ir)
{
DirectoryInfo dInfo = new DirectoryInfo(folder);
DirectorySecurity ds = dInfo.GetAccessControl();
FileSystemAccessRule fsRule = new FileSystemAccessRule(ir, fsRights, AccessControlType.Allow);
ds.AddAccessRule(fsRule);
dInfo.SetAccessControl(ds);
}
However when you right click and choose security properties for a given folder there is a list of attributes check boxes:
Full
Modify
Read and Execute
Folder List
Read
Write
Special Permissions
The code from above adds to Special Permissions rules only. How to enable the rest of the items?
In web application I need to enable IIS_IUSRS write permission to some folder. If I run the code as above Special Permissions rule is created. However it does not work.
Only if manually checked Write box web application can create and access files in a given folder.
Чесноков
|
|
|
|
|
I guess it has something to do with the FileSystemRights [^] object you're passing to your method.
Check the different members in the link provided.
Moreover, when you check the file/folder permissions, there's an 'advanced' button you can click to see a more detailed view of defined NTFS rights.
Tip : the FileSystemRights enum has a FlagAttribute => you can do a logic OR combination to give several permissions.
FileSystemRights fsr1 = (FileSystemRights.Read | FileSystemRights.ExecuteFile);
FileSystemRights fsr2 = FileSystemRights.ReadAndExecute;
Debug.WriteLine("fsr1 == fsr2 => {0}", (fsr1 == fsr2)); => should print 'True'
|
|
|
|
|
hi there,
im going to run a custom action in a setup proj... its a driver installer which depends on windows platform
now i have two version of this driver x64 and x86 ... i know there is a condition properties for detecting platform... but what should i write in it for this reason?
|
|
|
|
|
What do you mean?
This?
if (IntPtr.Size == 8)
;
else
;
|
|
|
|
|
I doubt that; there probably is only one installer for all Windows systems, so it is bound to be x86. Testing IntPtr.Size tells about the own process, which would then always return 4. The installer really should be interested in the Windows version, i.e. what sits outside its own boundaries. Unless MS provided something tailored for this in installers, I'd go with WMI.
|
|
|
|
|
it wasnt what i need, I need a condition varaible for windows installer, to do a custom action in two way depends on 64bit os or else... like
memmory>=4000
i need something to check 64bit like
64bit=1
|
|
|
|
|
I'd start moving away from the Setup and Deployment project in Visual Studio. It won't exist in the next Visual Studio release. The supported method will be InstallShield (Lite or Express or whatever...)
Windows Installer has supported x64 component since release 2.0. Normally, I'd create a seperate x64 version of the installer. But, depending on what you're doing, you may be able to do something like adding the x64 components (tagged as such) to a seperate feature, then in a CA, check the VersionNT64 property and make a call to SetFeatureState as appropriate to turn on/off its install state, in the InstallExec sequence. And you don't need any .NET code to do this.
You also have to keep in mind a 32-bit installer cannot write to 64-bit registry and file locations...
|
|
|
|
|
Hi, All.
I compiling an assembly programmatically from a .cs file. I can work with it what i need but if i want to reuse it a get "The process can not access the file because it is being used by another process". the message is clear but i cant to dispose or erase or whatever this dll to reuse it.
any idea?
thank you very much.
|
|
|
|
|
Hi,
AFAIK there are two solutions:
1.
when loading and executing a DLL, there is no direct way to unload the DLL, as the app would not trust you to do so while it might still be executing the DLL code. There is a way around this using another AppDomain; you can load DLLs to an AppDomain, and later unload the entire AppDomain. That would free the DLL; however you'd have to cross the AppDomain borders, so this is not the way I do it.
2.
You can compile to memory and run from there. CompilerParameters.GenerateInMemory and CompilerParameters.GenerateExecutable are some relevant porperties.
|
|
|
|
|
Thanks a lot, the CompilerParameters.GenerateInMemory was the solution.
|
|
|
|
|
you're welcome.
|
|
|
|
|
I need to write a code that mimics the control system for a garage forecourt petrol pump. Once the User has selected the required type and volume of fuel the display message will show the following line BEFORE re-displaying the menu with the adjusted volume of that type of fuel....
you selected....litres of fuel type......
enter to continue.
I have only written the code to display the types of fuel but i do not know what code to write that ask the user to type in a number. Do I need to declare a variable??
Console.WriteLine("1 - Four Star Petrol - £1.15 per litre. Volume available...100...litres");
Console.WriteLine("2 - Unleaded Petrol - £1.20 per litre. Volume available...100...litres");
Console.WriteLine("3 - Diesel - £1.25 per litre. Volume available...100...litres\n");
Console.WriteLine("Select 1, 2 or 3 and follow prompt for volume required:");
|
|
|
|
|
Janded wrote: Do I need to declare a variable??
Yes - and then you'll need to read the value into it - if you use Console.ReadKey you can intercept the value the user typed in and check it (it returns a ConsoleKeyInfo structure which you can easily interrogate).
|
|
|
|
|
How about Console.ReadLine ??
|
|
|
|
|
Simple console input here[^].
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|
|
Hi, I would like to get the complete code for data enrty using datagridview. I want to insert the data into a table. The columns are
1. Slno (auto ncrementing)
2. A value from a dropdown.
3. A value from master based on column 2 selection
4. Quantity (int)
5. product of col 3 and col 4
after col 4, a new row to be inserted and cursor to got to col 2.
Anybody help !!!
Thanks
|
|
|
|