这为插入函数:
public virtual bool Insert(IUruserRecord uruser)
{
SqlRunTimeNote note = uruser.Note;
if(note != null) note.AppendLine(SqlReturnState.Start, "开始Insert...");
//组装SQL
string insertCommandTextTemplate = @"insert into
{0}(userId, userName, phoneNumber, address, sex)
Values(:userId, :userName, :phoneNumber, :address, :sex)";//这里为插入语句,原本为Oracle的,现在要改成Mysql用的,":userId, :userName, :phoneNumber, :address, :sex"这些数据绑定不上.
string insertCommandText = string.Format(insertCommandTextTemplate, SchemaName + "." + Uruser.QueryTableName);
//装载指令
DbCommand cmd = Dbo.NewCommand(insertCommandText);
uruser.LoadChangedParametersAndClear(cmd);
//执行
Dbo.ExecuteCommand(cmd, note);
return (note.State == SqlReturnState.Success);
}
急需大神
http://www.cnblogs.com/humble/p/3380065.html
这个可以解决你的问题
大神,我们是在自己写代码生成器,在上面的插入语句出现了问题,可否指点一二?