|
Which tool are you using?
is that msgConnect?
My small attempt...
|
|
|
|
|
Hi ,
I am using Visual Studio.
With Thanks
Sakthi
|
|
|
|
|
can you just paste the exception you are getting
My small attempt...
|
|
|
|
|
Hi,
A connection attempt failed because the connected
party did not properly respond after a period of time.
Sakthi
|
|
|
|
|
I once ran into this error and couldn't figure it out for literally hours.
Then I realized I had typed in '45' for the timeout which, naturally, is specified in milliseconds. I was telling it to wait 45 milliseconds to timeout.
I sheepishly changed it to 45000 and went about my business.
Check for that
|
|
|
|
|
Hi,
i didnt set any timedout parameter for Socket Connection.
As for as I know TimedOut can be set for sending and receiving messages.
If i want to set Timedout for Socket Connection how should i do.
Sakthi
|
|
|
|
|
Can anyone cite any examples of the C# language being implemented outside of Mono and .NET?
|
|
|
|
|
Just googled it. http://www.dotgnu.org/[^]
"Throughout human history, we have been dependent on machines to survive. Fate, it seems, is not without a sense of irony. " - Morpheus
"Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
|
|
|
|
|
Thanks. What did you Google? I've not had much success excluding things from a Google search.
|
|
|
|
|
Well niether did I, it was on the 5th page for "C# NOT .NET NOT mono" Obviously, "NOT" doesn't seem to be google search operator (should be "-"), but hey, it's morning :->
"Throughout human history, we have been dependent on machines to survive. Fate, it seems, is not without a sense of irony. " - Morpheus
"Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
|
|
|
|
|
1. what is dynamic polymorphism?
2. I have three classes c1,c2,c3. In c1 and c2 I have same method m. Now if I access the method in c3 by inheriting from c1 and c2 which class method executes c1 or c2. plz answer these...
yamini
|
|
|
|
|
The answer to two is that there is no answer, unless we first assume that c1 -> c2 -> c3. There is no way to inherit from more than one class in C#.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
|
1.dynamic polymorphism is late binding
If you have same methods in base and derived class
then consider the situation
You are trying to create the object
Base objBase = new Derived();
objBase.Method();
will invoke the base class' method otherwise you declared it as virtual..
The method to be invoked is clear only at running................
2. we dont have multiple polymorphism in c#, for that you can use interface.
My small attempt...
|
|
|
|
|
I get the following when trying to build a tree from the following code:
The action being performed on this control is being called from the wrong thread.
I thought I was using the correct BeginInvoke. Thanks for any help!
private void main()
{
...
SetRunCollectionTree srct = new SetRunCollectionTree(this.RunCollectionTree);
srct.BeginInvoke(null, null);
}
public delegate void SetRunCollectionTree();
public void RunCollectionTree()
{
try
{
this.collectionTree.BuildTree();
}
catch(System.Exception e)
{
MessageBox.Show(e.Message);
}
}
RABB17
"Nothing fancy needed, please just solve all our problems as quickly as possible."
|
|
|
|
|
In Vs2005 dotnet2.0 it is not permitted to access a form control from a different thread then the owner thread. You must use a callback to do this.
See
http://support.microsoft.com/kb/318604[^]
mdv113
|
|
|
|
|
Hi all,
i have a darabase in access i wanna edit a column in a table. my coding has no errors. also the dataset gets updated with the change but the real table doesn't get updated .
this is my coding.
OleDbConnection OLEDBcon = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\\WmsFoodCityPerformance.mdb" +
";Jet OLEDB:Database Password=sanuja");
OLEDBcon.Open();
string sel = "SELECT * FROM CON_AKU";
OleDbDataAdapter OLEDBda = new OleDbDataAdapter();
try
{
OleDbCommand OLEDBselcom = new OleDbCommand(sel, OLEDBcon);
OLEDBda.SelectCommand = OLEDBselcom;
}
catch
{
}
finally
{
DataSet ds = new DataSet();
OLEDBda.Fill(ds);
DataTable dt = new DataTable();
dt = ds.Tables[0];
foreach (DataRow dr in dt.Rows)
{
dr.BeginEdit();
dr["BGT_JUN"] = 0;
dr.EndEdit();
dr.AcceptChanges();
dt.AcceptChanges();
}
OLEDBda.Update(ds);
MessageBox.Show("Done");
dataGridView1.DataSource = ds.Tables[0];
}
}
please help
Regards
Ruwandi
rkherath
|
|
|
|
|
i think u need to set the update command of dataadapter with proper parameters
if u want to to update DB with Data Adapters Update method.
rahul
|
|
|
|
|
Hi,
yes i did just now. it works. but i have 36 fields to update.
OleDbCommand upcom = new OleDbCommand();
upcom.CommandText = "UPDATE CON_AKU SET BGT_JUN" + dr["BGT_JUN"];
upcom.Connection = OLEDBcon;
upcom.ExecuteNonQuery();
so i wanna know if i can set the value in the data table row by row and update the entire row at once. please let me know if there is a way. also i found a nother way from a site. but even that doesn't work out.
this is the coding
void oledbConnection(string path,string CONstr)
{
OleDbTransaction trans;
OleDbCommand OLEDBSelectCom = new OleDbCommand();
OleDbCommand OLEDBupdateCom = new OleDbCommand();
OleDbConnection OLEDBcon = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\\WmsFoodCityPerforman"+
"ce.mdb;Jet OLEDB:Database Password=sanuja");
OLEDBcon.Open();
trans = OLEDBcon.BeginTransaction();
OleDbDataAdapter OLEDBda = new OleDbDataAdapter();
OLEDBSelectCom.Transaction = trans;
OLEDBSelectCom.CommandText = "Select * from CON_" + CONstr;
OLEDBupdateCom.Connection = OLEDBcon;
OLEDBSelectCom.Connection = OLEDBcon;
DataSet ds = new DataSet();
OLEDBda.SelectCommand = OLEDBSelectCom;
OLEDBda.UpdateCommand = OLEDBupdateCom;
OLEDBda.Fill(ds);
DataTable dt = new DataTable();
dt = ds.Tables[0];
foreach (DataRow dr in dt.Rows)
{
//OLEDBupdateCom.CommandText = "update CON_" + CONstr + " set NET_APR=0.0";
dr["BGT_APR"] = 0;
dr["BGT_JUN"] = 0;
dr["BGT_JUL"] = 0;
dr["BGT_AUG"] = 0;
dr["BGT_SEP"] = 0;
dr["BGT_OCT"] = 0;
dr["BGT_NOV"] = 0;
dr["BGT_DEC"] = 0;
dr["BGT_JAN"] = 0;
dr["BGT_FEB"] = 0;
dr["BGT_MAR"] = 0;
dr["BUDGETED"] = 0;
dr["BUDGET_PES"] = 0;
dr["LYNET_APR"] = dr["NET_APR"];
dr["LYNET_JUN"] = dr["NET_JUN"];
dr["LYNET_JUL"] = dr["NET_JUL"];
dr["LYNET_AUG"] = dr["NET_AUG"];
dr["LYNET_SEP"] = dr["NET_SEP"];
dr["LYNET_OCT"] = dr["NET_OCT"];
dr["LYNET_NOV"] = dr["NET_NOV"];
dr["LYNET_DEC"] = dr["NET_DEC"];
dr["LYNET_JAN"] = dr["NET_JAN"];
dr["LYNET_FEB"] = dr["NET_FEB"];
dr["LYNET_MAR"] = dr["NET_MAR"];
dr["NET_APR"] = 0;
dr["NET_JUN"] = 0;
dr["NET_JUL"] = 0;
dr["NET_AUG"] = 0;
dr["NET_SEP"] = 0;
dr["NET_OCT"] = 0;
dr["NET_NOV"] = 0;
dr["NET_DEC"] = 0;
dr["NET_JAN"] = 0;
dr["NET_FEB"] = 0;
dr["NET_MAR"] = 0;
dr["LYADJ_APR"] = dr["ADJ_APR"];
dr["LYADJ_JUN"] = dr["ADJ_JUN"];
dr["LYADJ_JUL"] = dr["ADJ_JUL"];
dr["LYADJ_AUG"] = dr["ADJ_AUG"];
dr["LYADJ_SEP"] = dr["ADJ_SEP"];
dr["LYADJ_OCT"] = dr["ADJ_OCT"];
dr["LYADJ_NOV"] = dr["ADJ_NOV"];
dr["LYADJ_DEC"] = dr["ADJ_DEC"];
dr["LYADJ_JAN"] = dr["ADJ_JAN"];
dr["LYADJ_FEB"] = dr["ADJ_FEB"];
dr["LYADJ_MAR"] = dr["ADJ_MAR"];
dr["LYADJ_APR"] = 0;
dr["LYADJ_JUN"] = 0;
dr["LYADJ_JUL"] = 0;
dr["LYADJ_AUG"] = 0;
dr["LYADJ_SEP"] = 0;
dr["LYADJ_OCT"] = 0;
dr["LYADJ_NOV"] = 0;
dr["LYADJ_DEC"] = 0;
dr["LYADJ_JAN"] = 0;
dr["LYADJ_FEB"] = 0;
dr["LYADJ_MAR"] = 0;
dr.AcceptChanges();
//OLEDBupdateCom.ExecuteNonQuery();
}
dt.AcceptChanges();
OLEDBda.Update(ds);
trans.Commit();
// dataGridView1.DataSource = ds.Tables[0];
OLEDBcon.Close();
//ds.GetChanges();
//OLEDBupdateCom.CommandText="update CON_"+CONstr+" set
}
rkherath
|
|
|
|
|
I want to dispose my previous form on the after select event of tree view control but when i try to do so i get the following exception message
System.ObjectDisposedException: Cannot access a disposed object named "TreeView".
Object name: "TreeView".
I m building Windows application In C# 2003.Thanx for Ur help
|
|
|
|
|
Sounds like you're disposing too soon. Can we see some code ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
private void TreeView1_AfterSelect(object sender, System.Windows.Forms.TreeViewEventArgs e)
{
switch(name)
{
case "1":
{
Form3 f=new Form3();
f.Show();
this.close();
break;
}
}
}
My code is like this. I am opening new form and disposing the current form.
|
|
|
|
|
Hello,
If 'this' is the main form, you are not able to Close (Dispose) without ending the Application.
All the best,
Martin
|
|
|
|
|
"this" is not my main form. i know i cant close my main form. This is just another form which i want to close.
|
|
|
|
|
Hello,
Is the some other code executed after the switch case statement?
Try to debug!
All the best,
Martin
|
|
|
|