OleDbDataAdapter  oadp1=new OleDbDataAdapter("insert into categories (categoryname,description) values ('guitars','here you can find just the ');select @@identity  as 'identity'",sqlcon1);
显示:  在 SQL 语句结尾之后找到字符。
注:我用的是C#这与编程语言没有关系吧
该怎么写

解决方案 »

  1.   

    OleDbDataAdapter  oadp1=new OleDbDataAdapter("insert into categories (categoryname,description) values ('guitars','here you can find just the ')",sqlcon1);
    这样就不会有错。select @@identity  as 'identity'这个是什么?
      

  2.   

    vzxq(灵感人)不如帮着写一个,我们也学习一下,呵呵
      

  3.   

    我觉得select @@IDENTITY  as 'Identity'
    这句写错了
      

  4.   

    在查询分析器上试了没问题啊试试把select @@IDENTITY  as 'Identity'写成select @@IDENTITY  as [Identity]看行不行
      

  5.   

    分析出来了,根本不能用OleDbDataAdapter的