专栏'艺术家名称'不属于C#上的表

时间:2011-12-06 14:38:54

标签: c# asp.net sql database ado.net

您好,我的C#程序出现问题,我正在尝试将数据艺术家名称保存在我的数据库中,我收到此错误消息

"Column 'artistname' does not belong to table on C#"

我该如何解决?

以下是我的数据库中的屏幕截图: enter image description here

这是代码

private string artistName;        
public string artistname
{
    get
    {
        return artistName;
    }
    set
    {
        artistName = value;
    }
}

clsDataConduit track = new clsDataConduit();
track.Execute("sporc_tbltrack_GetAll");
track.NewRecord["artistname"] = artistName;

3 个答案:

答案 0 :(得分:0)

你确定这是正确的名字“sporc_tbltrack_GetAll”???因为我在其他帖子中看到你在这里有字段artistname“sporc_tblaristtable_GetAll”

https://stackoverflow.com/questions/8379313/search-for-some-sql-commands-on-c-sharp

答案 1 :(得分:0)

如果您使用的是存储过程,则很有可能在存储过程中出错。

祝一切顺利!

答案 2 :(得分:-2)

 private string artistName;        
 public string ArtistName
    {
        get
        {
            return artistName;
        }
        set
        {
            artistName = value;
        }

    }
clsDataConduit track = new clsDataConduit();
track.Execute("sporc_tbltrack_GetAll");
track.NewRecord["artistname"] = artistName;