|
What is the error message ?
Probably you must use [Serializable] over the class Employee
[Serializable]
public class Employee
{
...
}
|
|
|
|
|
I have a run time error in
emp[i] = (Employee)xs[i].Deserialize(fs);
say that "There is an error in XML document (2, 2)."?!
|
|
|
|
|
How do i Delete A and Prt Records from DNS in csharp?
|
|
|
|
|
With difficulty ...
Please reword your question so that it means something.
|
|
|
|
|
i'm trying to manage my dns server i'm have a csharp program that deletes computer from the domain after the have not loged on in 90 day and i wanted to also delete them from DNS so i need to delete A and Prt records for the computer i am removing from Active Directory
|
|
|
|
|
Hi
I have one dropdown contain status information.
Status are
1. Finished
2. Open
3. Progress
Also one date textbox.
I want to set the text box is editable and mandatory when i select the status as finished in the dropdown. Otherwise it should accept null values(not mandatory) and read only.
Can any one help me please. its urgent. It should be in C# or java script
Regards
K7
kesavan
|
|
|
|
|
NK7 wrote: its urgent.
Not to us! Please read the guidelines.
|
|
|
|
|
u can put the validation based on the status code of dropdown while submitting the form using javascript.if the status is finished then put check on text box should not be blank.
rahul
|
|
|
|
|
This is a C# forum. Why would you suggest JavaScript? Unless you have assumed that the OP is writing a Web App, in which case you should point him towards the Web Development forum.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi everybody
I want develop a software which works with database and also program shall be install on the several station on the network and interchange data between them.
I using C# for developing program and SQL server for DB.
Previously for the similar application,I used Microsoft SQL Server Express Edition 2005 for database. Because with small engine you can use it, But sometimes doesn't work in Vista OS.
what is your suggestion about DB tools, I should change my DB tools in the new application or No?
Best Regards,
Reza Shojaee
|
|
|
|
|
Yes, change to SQL Express 2008, rather than 2005. Otherwise, if it works for you and this project, why change?
only two letters away from being an asset
|
|
|
|
|
Reza Shojaee wrote: I used Microsoft SQL Server Express Edition 2005 for database. Because with small engine you can use it, But sometimes doesn't work in Vista OS.
Sometimes it won't work on XP or Windows Server 2003 either. That's usually a configuration-detail.
Did you receive an error message?
I are Troll
|
|
|
|
|
Error "String or Binary data would be truncated. The Statement has been terminated" error on
code >>>>>>
public static bool SaveVisitor(string id,string n, string c, decimal p, string e,string a, string city, string country)
{
drow = ds.Tables[0].NewRow();
drow[0] = id;
drow[1] = n;
drow[2] = c;
drow[3] = p;
drow[4] = e;
drow[5] = a;
drow[6] = city;
drow[7] = country;
ds.Tables[0].Rows.Add(drow);
vda.InsertCommand = vcb.GetInsertCommand();
int res = vda.Update(ds.Tables[0]); // showing error
if (res > 0)
{
System.Windows.Forms.MessageBox.Show("Visitor Details Added");
return true;
}
else
return false;
}
|
|
|
|
|
amaankhan wrote: sometimes its working and sometimes its showing error
At the time of error, trace the values going into dataset and see if something is wrong with values.
|
|
|
|
|
My guess is that the times you get the error its because "string or binary data would be truncated".
Not sure why I think that though, it might have something to do with the error message. Of course, you might not understand what that error actually means, but google does[^]
|
|
|
|
|
DataAdapters are evil and should be avoided. If you want to insert some data, just insert it, it's not difficult and you'll be better off.
|
|
|
|
|
public class Grammer
{
private MyString[][] lst = new MyString[4][];
private MyString[] a = { new MyString("eval",'n'), new MyString("exp",'n') };
private MyString[] b = { new MyString("exp",'n'), new MyString("fact",'n'),new MyString("exp + fact",'n') };
private MyString[] c = { new MyString("fact",'n'), new MyString("num",'n'), new MyString("( exp )",'n') };
private MyString[] d = { new MyString("num",'n'), new MyString("(0|1|2|3|4|5|6|7|8|9|)+",'t') };
public Grammer()
{
lst[0] = a;
lst[1] = b;
lst[2] = c;
lst[3] = d;
}
}
class MyString
{
private String lst;
private char terminal;
public MyString(String s, char c)
{
lst = s;
terminal = c;
}
}
static void Main(string[] args)
{
int lstcount = 0;
Grammer lst = new Grammer();
Console.ReadLine();
}
Hello...
The private members are visible in main.
How?
|
|
|
|
|
hotthoughtguy wrote: The private members are visible in main.
Private members of Grammar class?
|
|
|
|
|
|
I tried your code and I can't see private members of that class from main .
|
|
|
|
|
It shouldn't disply private members.
|
|
|
|
|
amazingly i can see them from main
|
|
|
|
|
Its really amazing
cause even i couldn't see private members.
|
|
|
|
|
Weird.. I tried the code as well and I can't access any private members. For instance, the code
lst.a = null;
does not compile.
Can you show the code that allows access to these members?
|
|
|
|
|
hotthoughtguy wrote: The private members are visible in main.
Well they shouldn't be
I'd try restarting Visual Studio, maybe it glitched
|
|
|
|