Line 1: Incorrect syntax near 'Line 1: Incorrect syntax near 'GetTotalAmount'. 
不正确的语法在'GetTotalAmount'的附近
查看程序文件: C:\BegECom\WroxJokeShop\BusinessObjects\ShoppingCart.vb    行: 116 

解决方案 »

  1.   

    Dim amount As Decimalamount = command.ExecuteScalar()是做什么的?
    你应该是整型的吧!SqlCommand.ExecuteScalar 方法请参见
    SqlCommand 类 | SqlCommand 成员 | System.Data.SqlClient 命名空间 
    要求
    平台: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows .NET Server family
    语言
    C#C++JScriptVisual Basic全部显示
    执行查询,并返回查询所返回的结果集中第一行的第一列。忽略额外的列或行。
      

  2.   

    SQL语句有错误,检查SQL语句或存储过程
      

  3.   

    是不是没有SQLCommand没有指明StoredProcedure属性阿
      

  4.   

    没见到你的代码中有'GetTotalAmount'啊,
    如果'GetTotalAmount'在存储过程中,那么就是存储过程错了。