|
A datareader from a datatable? Are you talking about System.Data.DataTable class?? If its your case I suggest two ways:
1.Make a forecach loop through DataTable.Rows and make anything foreach row.
2.To complement the upper suggestion use DataTable.Select('where clause') and store DataRow[] result in a var and make a foreach loop on this DataRow[].
Visit my blog at http://dotnetforeveryone.blogspot.com
|
|
|
|
|
Hi,
I doesn't have much to do with C#, anyway, I'm looking for a good free .MSI creator to publish (install) .NET project I'm working on.
Do you know any?
thanx
zilo
|
|
|
|
|
Do you know IIS(Inno Setup)? Its free and use extended...
Visit my blog at http://dotnetforeveryone.blogspot.com
|
|
|
|
|
I always use the Visual Studio Setup Installation package. Or perhaps you were talking about something else?
I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")
|
|
|
|
|
VS Setup Installation lacks many features that I need. Custom prerequisites, multiple language support, writing into Registry, custom actions.
zilo
|
|
|
|
|
Zilo(svk) wrote: VS Setup Installation lacks many features that I need. Custom prerequisites, multiple language support, writing into Registry, custom actions.
I recently had the same problem, I needed to do every thing you listed. I did all by using the VS setup package. Both of the articles below have examples on how to tackle all of the issues you listed
http://www.codeproject.com/install/shortcut_installer.asp[^]
http://www.codeproject.com/install/SetupAndDeployment.asp[^]
I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")
|
|
|
|
|
Hi.
First of all thanx for tips.
How can I translate installation package into other language than those that are in Localization Property of Deployment Project Properties? I can't figure it out...
zilo
|
|
|
|
|
How about WiX (Windows Installer XML). Its free and MS uses it for installers such as Office 2007.
Hogan
|
|
|
|
|
thanx for all tips
zilo
|
|
|
|
|
Hi,
I need to Restrict Copy Access for a Folder and the Files in it. I will be given a File with MyEncriptedFile.MyExtension . When the User clicks on it, it is decripted ,saved in a folder and Opened automatically.
The file say if it is a PDF file the user should not be able to copy it using File->save as option. Iam able to set permissions for a folder.
by creating the directory as below using managed C++.
DirectoryInfo^ dsInfo = gcnew DirectoryInfo(strdirpath);
DirectorySecurity^ ds = gcnew DirectorySecurity();
ds->AddAccessRule(gcnew FileSystemAccessRule(struserName,FileSystemRights::Delete|FileSystemRights::DeleteSubdirectoriesAndFiles|FileSystemRights::CreateFiles, AccessControlType::Allow));
dsInfo->Create(ds);
After setting these permissions I can access the folder only Programmatically and not by clicking. I created a PDF file in that folder Programmatically and opened it. Now, Iam unable to restrict the file from copying .
FileInfo^ filInfo = gcnew FileInfo(m_strFilePath);
FileSecurity^ filsec = gcnew FileSecurity();
filsec->AddAccessRule(gcnew FileSystemAccessRule(m_strUserName,FileSystemRights::Traverse, AccessControlType::Allow));
fs = filInfo->Create();
What are the Permissions I should be giving in FileSystemRights for restricting my file from getting copied?
Any suggestions would be helpful.
Thanks
Today is a gift, that's why it is called the present.
|
|
|
|
|
You may want to ask this on a C++ forum. This one's for C#.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi All,
Could you please help me to why we write IE tool bar in VS.Net 2008. Is it has any build-in class support. Please suggest some articles.
I have article, which developped in 2003. But want's to know any built in support in VS.Net 2008.
Thanks in advance.
srinivas
|
|
|
|
|
I'm in harry , i had a program that i use TAPi (julmar library ) to connect Via Phone . i can connect but i dont have any Voice whats my problem ???/
|
|
|
|
|
sima_m wrote: I'm in harry , i had a program that i use TAPi (julmar library ) to connect Via Phone . i can connect but i dont have any Voice whats my problem ???/
|
|
|
|
|
sima_m wrote: I'm in harry
That's more information than was needed for a programming question.
|
|
|
|
|
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.
|
|
|
|
|
sima_m wrote: i dont have any Voice whats my problem
Shouldn't you be asking this on a medical forum? If I had to guess though, I'd say you've got laryngitis.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi!
For example, i have a class A.
Then i create array of object of A:
private A[] arr;
In a function B:
{ .....
arr[i]=new A();
loop i;
.....
}
After B is done, all of arr[i] will be disappeared but i want them to live until the program finishes.So, how can i do that?
Best regard!
|
|
|
|
|
i`m beginner wrote: private A[] arr;
You have not specified the length of the array. It would be
private A[] arr = new A[10];
i`m beginner wrote: arr[i]=new A();
loop i;
Initialize the array in constructor of the form or in form_load.
|
|
|
|
|
i`m beginner wrote: After B is done, all of arr[i] will be disappeared
The above is not true. you lose the objects only when arr goes out-of-scope (hint on arr declaration).
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.
|
|
|
|
|
CPallini wrote: i`m beginner wrote:
After B is done, all of arr[i] will be disappeared
The above is not true.
It is true, because the array does go out of scope outside of B.
|
|
|
|
|
Brady Kelly wrote: It is true, because the array does go out of scope outside of B.
It is not true, as the array is not declared as a local variable in the method B.
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
My bad, I didn't see the declaration the first time round, it was just scrolled off the screen, so I facetiously posited than its scope would be open to interpretation.
|
|
|
|
|
I mean i have class A and the program is:
....
private A[] arr;
private int count=0;
....
public void func1(int size)
{
....
arr=new A[size];
....
}
// for example, when button is clicked, func2 will be called.
public void func2()
{
.....
arr[count]=new A();
count++;
.....
}
To: N a v a n e e t h: i have specified the length of the array.
To: CPallini: when func2 is done, will arr[count] be lost? because i can't use the arr[count] for func3 like this:
public void func3()
{
point F=new point();
F=arr[count].getPoint(); // getPoint is a property of classA
}
So how to keep arr[count] still alive until the program is finished.
Thanks all for replying.
-- modified at 9:00 Wednesday 7th November, 2007
|
|
|
|
|
i`m beginner wrote: when func2 is done, will arr[count] be lost?
No, it will not be lost. However, as the variable count is the index of the next item to be assigned, arr[count] will always be null.
i`m beginner wrote: because i can't use the arr[count] for func3 like this
Of course you can't. As it's always null, you will get a null reference exception if you try to use it as if it referenced an object.
What is it that you are trying to do? Are you trying to access the most recently assigned item, i.e arr[count - 1] ?
Experience is the sum of all the mistakes you have done.
|
|
|
|