C# Programming
11-07-2009, 04:41 AM
Hi,
I Add New Class in My Solution For Use Some Functions in Other Forms.
If i Use this Code
public static void *******UserList()
{
dtTableUserList = new DataTable();
try
{
dtTableUserList.Rows.Clear();
string cmd = "select * from tblLogin order by UserName";
da = new OleDbDataAdapter(cmd, con);
con.Open();
da.Fill(dtTableUserList);
con.Close();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
here ERROR is in
MessageBox.Show(ex.Message);
How i show messegebox in class
Thanks & Regards
Form :-
Vikash Yadav
Mob : 9210907172
I Add New Class in My Solution For Use Some Functions in Other Forms.
If i Use this Code
public static void *******UserList()
{
dtTableUserList = new DataTable();
try
{
dtTableUserList.Rows.Clear();
string cmd = "select * from tblLogin order by UserName";
da = new OleDbDataAdapter(cmd, con);
con.Open();
da.Fill(dtTableUserList);
con.Close();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
here ERROR is in
MessageBox.Show(ex.Message);
How i show messegebox in class
Thanks & Regards
Form :-
Vikash Yadav
Mob : 9210907172