sb1.Append("select timevalue from fee_@ date where svctype='3'");
db.AddInParameter(cmd1, "type", DbType.Int32, Type_HD));
查询每数据
我觉得是”fee_@ date “的问题,不知道大家怎么看,如果是的话,告诉我该怎么写
select timevalue from fee_@ date where svctype='3'
没看明白,哪个是传入参数?
例子:
public void InsertMerchandises(Merchandises mers)
{
string sql = "insert into T_Merchandises(merName,providerID) values(@merName,@providerID)";
Database db = DatabaseFactory.CreateDatabase(ConStr);
DbCommand insertCommand = db.GetSqlStringCommand(sql);
db.AddInParameter(insertCommand, "@merName", DbType.String, mers.MerName);
db.AddInParameter(insertCommand, "@providerID", DbType.Int32, mers.ProviderID);
db.ExecuteScalar(insertCommand);
}
[此贴子已经被作者于2007-8-8 11:09:37编辑过]