PDA用webservices用访问数据库问题
架构: PDA应用程序+ webservices服务
VS2005,IIS6,SQL2005
是想通过pad的程序访问webservices里的方法来操作数据库
现在调用webservices里的方法来调用存储过程添加数据,
出现
值不在预期的范围内,位于
Microsoft.AGL.Common.MISC.HandleAr()
位于 System.Windows.Forms.Form.CloseModal()
位于System.Windows.forms.Form.Close()
位于CookPDA.Order.OrderDish.button4_Click
源代码:
//开台写入数据库
try
{
PDAService.Service ps = new CookPDA.PDAService.Service();
string m_strSQL = @"Insert Into tb_sale_SalesOrderDishDetails( FSalesOrderID,FDishID,FQty,FTaste,FRequire,FStateID,FDate,FUnitID,FPrice,PrintState,IsZero,DiscountFPrice,CBTypeID ) " +
" values( " + m_intFSalesOrderID.ToString() + "," + m_intFDishID.ToString() + "," + m_decFQty.ToString() + ",'" + m_strFTaste + "','" + m_strFRequire + "'," + m_intFStateID.ToString() + ",'" + m_strFDate + "' ," + m_intFUnitID.ToString() + "," + m_decUnitPrice.ToString() + "," + m_intPrintState.ToString() + "," + m_intIsZero.ToString() + "," + m_decUnitPrice .ToString()+ "," + m_intCBTypeID.ToString() + ") ";
ps.ExecSQL(m_strSQL);
}
catch(Exception ex )
{
MessageBox.Show(ex.Message.ToString() + ex.StackTrace.ToString() + m_strSQL, "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1);
return;
}