|
You give a URL to a file so people expect that it will download said file. However, the same point applies. No one is going to want to visit an external link to view all of your code. Some access CP at work with restrictive firewalls or corporate policies that prevent it. Others simply don't want to. How many answers have you had so far?
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Is there any mathod to transfer bulky data One to another DB as like BulkCopy.....?
|
|
|
|
|
If the databases are both Sql Server (and maybe some others) you can use an INSERT/SELECT statement.
You can get a DataReader from the source database, and perform inserts on the destination database.
If you do it enough you can write a Windows Service to copy the data. I've had to do that in the past for a data warehousing project.
|
|
|
|
|
Hi.
I'm facing very frustrated problam.
The code is little long so i'll try to describe:
1. I have object (entity) called MyObj , and one of it's members is array of 'int' type, and called "intArr".
2. Collection List<MyObj> .
3. DAL project to manage the list.
4. In the 'main' class i have variable which is also array of 'int' type, and called "intArr".
this variable passed as parameter to function in the DAL project, to create new "MyObj" and add it to the List.
The problam:
When the variable "intArr" in the main changed, it's effected immidiately on the MyObj.intArr.
I thought that both, reference to the same 'intArr'. possible?
|
|
|
|
|
Yes, this is the reason: an array of int is treated as an object and is assigned "by reference".
If what you what is a "deep copy" of the array you should code it explicitly.
class MyObj
{
...
public void DoSomething(int [] intArr)
{
this.intArr = intArr.Clone();
}
...
}
|
|
|
|
|
Thanks. It helps.
Just needed "casting" as int
class MyObj
{
...
public void DoSomething(int [] intArr)
{
this.intArr = intArr.Clone() as int[];
}
...
}
Quote Selected Text
|
|
|
|
|
I have a program that is running on a kiosk. I'm using the Shockwave dll to play flash files. It appears as if the more complex the flash file is (more action script) there's a memory leak until eventually the program crashes. This program has the flash player on the screen and loads file after file without closing down. So if it's not really releasing all of the memory, which is what it appears to be doing, how can I clear out the memory?
If need be what I would do is after playing a file, I would destroy the object, cleanup the memory and then create a new one.
In looking around the web, I have not yet been able to find how to destroy the object, clean up the memory and then recreate the object.
Can somebody please help?
Thanks.
Jeff.
|
|
|
|
|
Effectively, have 2 instances running - when one is finished with unload it and load a new instance in a new app domain and show the background instance in place.
|
|
|
|
|
I don't understand what you mean by unload it and load a new instance. Do you mean unload the whole program? There is other stuff going on on the screen. The flash player is only part of what is visible on the screen.
Jeff.
|
|
|
|
|
No - I was thinking you'd have the Flash part in a separate AppDomain - you could overlay this over the top by controlling the Z Order. Release the App Domain, and reclaim the memory.
|
|
|
|
|
What do you mean by AppDomain?
BTW - don't know if it matters this is a Windows App.
J.
|
|
|
|
|
Are you using .NET (you should be if you are posting in the C# forum)? Look up Application Domains.
|
|
|
|
|
Pete,
I'm still trying to solve this. I'm using C# .Net 1.1 (Don't ask!) on a Windows App.
Any help would be greatly appreciated.
Jeff.
|
|
|
|
|
Hi!,
where do I configure the option that my windows service can be suspended and continued and not only started and stopped ?
(I meen that the options are shown and selectable in the service list menue).
Is it a code option or a setup option ?
Thanks
Frank
|
|
|
|
|
I haven't had a need to do that and I can't imagine needing it. Why do you want to do it?
|
|
|
|
|
Hi,
that's not the question. If you examine the service list you will find some services which have these options and some have not.
In my case it make sense to suspend the service do something with the data and after this to continue the service.
So, please where is the option to be set ?
Thanks
Frank
|
|
|
|
|
But why not just stop and start?
|
|
|
|
|
PIEBALDconsult wrote: Why do you want to do it?
Possibly to allow existing processing to terminate cleanly, and prevent some new processing, while still running other background processing.
|
|
|
|
|
Electron Shepherd wrote: allow existing processing to terminate cleanly
Stop should do that as well.
Electron Shepherd wrote: while still running other background processing.
Then it's not paused, is it?
Electron Shepherd wrote: other background processing
Possibly should be in its own Service.
|
|
|
|
|
A good example would be a web server implementing Keep-Alive. You may need to prevent new inbound connections, possibly for load balancing or other resource allocation requirements, but preserve the internal state data.
Dont forget that just because you've never needed to do it doesn't mean no-one ever needs to do it.
|
|
|
|
|
Electron Shepherd wrote: A good example would be a web server implementing Keep-Alive. You may need to prevent new inbound connections, possibly for load balancing or other resource allocation requirements, but preserve the internal state data.
And you are suggesting that you would not do that when stopping as well?
Electron Shepherd wrote: Dont forget that just because you've never needed to do it doesn't mean no-one ever needs to do it.
Don't forget that just because someone wants to do something it means that it is a good idea. Or even that it will solve their real problem.
|
|
|
|
|
jschell wrote: And you are suggesting that you would not do that when stopping as well?
Yes, becuase in my specific example, the internal state is related to a TCP connection, so maintaining and restoring the state across a stop / start event is meaninglesss.
jschell wrote: Don't forget that just because someone wants to do something it means that it is a good idea.
True. My reply was directed at the person who said (very unhelpfully in my opinion)
"I haven't had a need to do that and I can't imagine needing it."
|
|
|
|
|
I believe ServiceBase has a property called CanPauseAndContinue . Set it to true and then override the OnPause and OnContinue methods.
|
|
|
|
|
Hi Calla,
that sounds good.
Thanks
Frank
|
|
|
|
|
You're welcome!
|
|
|
|