|
OleDbConnection mySqlConn = new OleDbConnection(SqlConnString);
OleDbCommand mySqlCom = mySqlConn.CreateCommand();
OleDbConnection mySqlConn2 = new OleDbConnection(Sql2ConnString);
OleDbCommand mySqlCom2 = mySqlConn2.CreateCommand();
mySqlCom.CommandText = "SELECT * FROM OISInt_Contact";
OleDbDataAdapter mySqlAd = new OleDbDataAdapter();
mySqlAd.SelectCommand = mySqlCom;
DataSet myDS = new DataSet();
mySqlConn.Open();
mySqlAd.Fill(myDS, "OISInt_Contact");
mySqlCom2.CommandText = "SELECT * FROM OISInt_Contact";
OleDbDataAdapter mySqlAd2 = new OleDbDataAdapter();
mySqlAd2.SelectCommand = mySqlCom2;
DataSet myDS2 = new DataSet();
mySqlConn2.Open();
mySqlAd2.Fill(myDS2, "OISInt_Contact");
mySqlConn.Close();
mySqlConn2.Close();
myDS2.Merge(myDS, true, MissingSchemaAction.AddWithKey);
foreach (DataTable dt in myDS2.Tables)
{
foreach (DataRow dr in dt.Rows)
{
foreach (DataColumn dc in dt.Columns)
{
}
}
}
mySqlAd2.SelectCommand.Connection = mySqlConn2;
mySqlAd2.InsertCommand = new OleDbCommand(String.Format("OISInt_ContactInsert", myDS.Tables));
mySqlAd2.InsertCommand.CommandType = CommandType.StoredProcedure;
mySqlAd2.Update(myDS2, "OISInt_Contact");
when I do a step into all data is in the data set and it merges but goes not commit or accept changes to the database I trying to move it to.
Learning to Code
|
|
|
|
|
My application working fine in the dev environment.But in the testing /production environment
it is not working because that environment has only
windows server 2003
IIS
.net2.0 framework
In my application I have Used some microsoft VC++ dll's also along with .net dll's.
Now Iam getting "RUNTime Error" pop-up screen message as below
" The Application has been terminated in an Unusual Way"
On googling i came to know that some dll's like msvcrt.dll of windows server 2003 has to be changed...But Iam not pretty sure about it..
In Production/test environment there is only framework installed ,but there is no visual studio installed on it.may be due that this error may occur...
So kindly post your suggestions and views to help me
I tried the following as suggested by you:
1. I have installled the redistributable package suggested by you.
after installing i restarted the PC even now also I got the same runtime pop-up error.
2. Then I checked even with the dependency walker for the dll.
I found that there is no miising dll.
3. Then I tried by installing Visual C++ express edition..even then also i got the same pop-up error.
Kindly help me.....
|
|
|
|
|
Might need to have some of those dll's your talking about to be registered with regsrv.exe. But I guess that depends on the dll's your using and your deployment method.
Just because we can; does not mean we should.
|
|
|
|
|
I have a process that causes Virtual Bytes counter to constantly increase (to the point that the program throws an OutOfMemory exception after a few hours of running), but Private Bytes are not increasing. Is there anything we can do to trigger virtual memory collection? GC.Collect is obviously not helping.
|
|
|
|
|
Managed memory doesn't get fragmented, as the garbage collector compacts the heap. If your application really leaks memory, it's unmanaged memory. Are you disposing all objects that needs disposing?
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Guffa,
I use an external C++ library (QuickFix), so I would imagine that's where unmanaged memory is used. Otherwise, everything in my code is managed C#. I thought maybe in some momemnt of lunacy I did write unmanaged code, but search for words "unsafe" or "~" or "!" produces nothing.
When you say "application really leaks memory", wouldn't it cause increase in the Private Bytes memory? I don't observe that. The Private Bytes are increasing throughout the day, but every couple of hours they drastically go down. This is really purzzling, as I am watching GC Gen 0, GC Gen 1, and GC Gen 2 counters, and they all increment so I would think that Private Bytes would be managed better. So the infrequent drastic drop in Private Bytes is puzzling. Virtual Bytes, on the other hand, never go down.
I am trying memory comparisions between WindDbg breakpoints, but that isn't going all that quickly
|
|
|
|
|
Does your app do any kind of memory mapping? That would contribute to the Virtual bytes counter as well.
|
|
|
|
|
Senthil,
no, no memory mappings. Since I don't know how StreamWriter uses memory, one thing that I'd think can potentially cause problems is me writing large (GBs) log files.
It must be the unmanaged memory from the external unmanaged C++ library. I'm out of ideas as to what else can it be. The CLR profiler is showing no glaring problems with .Net-managed memory.
|
|
|
|
|
I did this!
private void lvFiles_SelectedIndexChanged(object sender, System.EventArgs e)
{
string filePath = lvFiles.SelectedItems.ToString();
ShellLib.ShellExecute shellExecute = new ShellLib.ShellExecute();
shellExecute.Verb = ShellLib.ShellExecute.OpenFile;
shellExecute.Path = @"F:\\Painel de Controle ETECH\\Projetos ETECH" + filePath;
shellExecute.Execute();
}
Am I close??
|
|
|
|
|
the event you're using will fire as you move down the list via keyboard or do single click selections. There should be a double click event. use that instead.
Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots.
-- Robert Royall
|
|
|
|
|
|
Whenever I put a check mark on a ToolStripMenuItem it is misplaced (above the center), tried to google this bug but unsuccessful...does anyone else got this bug or is it just me? Is there any patch or will I have to custom draw the ToolStripMenuItem?
Thanx in advance
|
|
|
|
|
pacoxl wrote: does anyone else got this bug
Nope. Tried to replicate it and works fine here
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Forgot to mention: try making the ImageScalingSize of the Toolbar to 32x32
|
|
|
|
|
What did you eventually do to resolve the check mark issue? I've just encountered the same problem (VB 2008).
Thanks - AB
XAlan Burkhart
modified on Monday, September 5, 2011 2:45 PM
|
|
|
|
|
Hi All
What im trying to do is to connect three diffrent Treeview to the Sql Server in the same Database.
E.g.
Project-Database
ProjecTable1-Table inside Database
ProjectTable2
ProjectTable3
I have tried to connect but only one out of 3 tables will populate the treeview . So i am bit stuck.
If this does not make Sense please contact me craig.mutoko@iondale.com and i will explain.
I need Help Urgently.
Please Contact me
|
|
|
|
|
craigMUTOKOKAI wrote: Help Urgently
Umm no.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
craigMUTOKOKAI wrote: I need Help Urgently.
craigMUTOKOKAI wrote: contact me craig.mutoko@iondale.com
Hi Craig,
dont say that!!! you wont get post that way!!!
Good Luck
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
I have a very simple requirement.
1. The application takes a list of phrases (could be anything - topics, companies etc.) separated by comma or new line etc.
2. I click 'run', and the application does the following
a) picks each item from the list
b) queries google
c) picks the top 2 results from google
d) goes into the web site that is the result
e) downloads the page to some folder
Is there any utility like this I could get? help really appreciated.
-c
|
|
|
|
|
HTTrack[^] is a tool for creating off line copies of web pages.
If that doesn't do the job, the app you have described would be fairly simple to write.
You would load the file in, and build up a list of the queries.
Then loop though the list and build web requests to google for each one.
Parse the response and extract the urls for the first 2 results.
Send a request for the url and save the result to the folder.
If you get stuck on something specific, post a question here and I'll be happy to help.
Simon
|
|
|
|
|
Depending on how many companies you've got to list you may be banned from Google for a while because it's acting (well is) a bot. Actually one of the easier ways to do this many be on Linux.
|
|
|
|
|
Just a couple of hundred - not hundreds of thousands. Would that be a problem as well?
|
|
|
|
|
From what I remember the limit is 1,000 for the SOAP API but they're not creating new keys for it anymore (they were free). You can possibly create a local web-page and sign up for the AJAX query stuff to retrieve what you want, alternatively if you don't mind parsing HTML (just had a look at the format of the Google results page and it's pretty clean) you can just use a HttpWebRequest[^] object to form the request and retrieve stuff from that.
Have a search for Html Agility Kit which allows parsing of non-well formed html.
|
|
|
|
|
I have one form based program in VC#.
I found the following problem:
when I run it only one time, it takes only about 1 second.
but when I run it 20 times by using a loop, it takes far more than 1*20=20seconds, actually it takes even more than 100 seconds!
I think it may be because some memory or sources are not released during the loop. but I don't how to release the memory and sources for each loop.
I do hope some expert can give me some hints!
thank you very much!!
|
|
|
|
|
Post your loop code. I can't help you if I don't know what you are doing.
Simon
|
|
|
|