Problem with update Mysql.!

01/28/2012 00:46 |xabi|#1
Hey Professionals

i've Problem with my Source, i made Change Name Npc but there were a problem when i change my name from npc it doesn't make any sense.
and i put the code it's not work
My Source Uses SubSonic

Two Codes Deon't Work

First code

PHP Code:
 public static void UpdateData(Client.GameState clientstring columnobject value)
        {
            
EntityCollection ent = new EntityCollection();
            
ent.LoadAndCloseReader(Entity.FetchByParameter("UID"client.Entity.UID));
            if (
ent.Count 0)
            {
                
ent[0].SetColumnValue(columnvalue);
                
ent[0].Save();
            }
        } 
PHP Code:
public static void UpdateName(Client.GameState client)
        {
            
UpdateData(client"Name"client.Entity._CName);
        } 
Second Code

PHP Code:
    public static void UpdateName(Client.GameState client)
        {
            
MySqlCommand command = new MySqlCommand(MySqlCommandType.UPDATE);
            
command.Update("entities").Set("Name"client.Entity.Name).Where("UID"client.Entity.UID).Execute();
        } 
and First code get me error

System.Exception: Can't save: Name requires a value

at SubSonic.ActiveRecord`1.Save(String userName)
at SubSonic.ActiveRecord`1.Save()

Thanks
01/28/2012 01:14 Spirited#2
Why do you do that...
You always make threads about basic errors (which you know... I'm fine with), but you welcome everyone by saying "Hey professionals". .... ..... It's not rocket science.

[Only registered and activated users can see links. Click Here To Register...]
01/28/2012 11:12 |xabi|#3
Quote:
Originally Posted by Fаng View Post
Why do you do that...
You always make threads about basic errors (which you know... I'm fine with), but you welcome everyone by saying "Hey professionals". .... ..... It's not rocket science.

[Only registered and activated users can see links. Click Here To Register...]


Of course Fang i always Welcome Everyone By saying "Hey Professionals" as the Professionals 'll help me and i 'm sure from That!!

1 day to fix and dun need to Fix :(