|
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
|
|
|
|
|
What do you mean by "visible" - do you mean you can access them in code, or that you can see them with intellisense / the debugger?
If it's the latter, then you're misunderstanding what private really means
|
|
|
|
|
Is Main a member of the Grammar class? If so, of course it can see the private fields.
|
|
|
|
|
Hi,
In VB.Net in a class I can define an event as:
Public Event MyEvent
and raise it in a method as :
RaiseEvent MyEvent
and in another class that has an instance of first class I can catch the event.
How can I do this simple process in C#? We don't have RaiseEvent in C#.
Actually I want to notify another class when a method executes in the class.
Best wishes
|
|
|
|
|
You look at the delegate as a method call. Don't forget if nothing's hooked up to it, it'll be null. So check for that.
if(this.MyEvent != null)
this.MyEvent(MyArgs);
|
|
|
|
|
see This
Hope it'll help.
|
|
|
|
|