本文整理汇总了C#中OGen.Libraries.DataLayer.DBConnection.Execute_SQLQuery方法的典型用法代码示例。如果您正苦于以下问题:C# DBConnection.Execute_SQLQuery方法的具体用法?C# DBConnection.Execute_SQLQuery怎么用?C# DBConnection.Execute_SQLQuery使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OGen.Libraries.DataLayer.DBConnection
的用法示例。
在下文中一共展示了DBConnection.Execute_SQLQuery方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Execute_SQL__delete
private void Execute_SQL__delete(DBConnection dbconnections_in) {
switch ((DBServerTypes)Enum.Parse(typeof(DBServerTypes), dbconnections_in.DBServerType)) {
case DBServerTypes.SQLServer:
case DBServerTypes.PostgreSQL: {
dbconnections_in.Execute_SQLQuery(string.Format(
"delete from \"CRD_User\" where \"Login\" = 'test-{0}'",
this.testid_
));
break;
}
default: {
throw new Exception(
string.Format(
"unsuported db type: {0}",
dbconnections_in.DBServerType.ToString()
)
);
}
}
}
示例2: Execute_SQL__insert
private void Execute_SQL__insert(DBConnection dbconnections_in) {
switch ((DBServerTypes)Enum.Parse(typeof(DBServerTypes), dbconnections_in.DBServerType)) {
case DBServerTypes.SQLServer:
case DBServerTypes.PostgreSQL: {
dbconnections_in.Execute_SQLQuery(string.Format(
"insert into \"CRD_User\" (\"Login\", \"Password\", \"IFApplication\") values ('test-{0}', 'password', null)",
this.testid_
));
break;
}
default: {
throw new Exception(
string.Format(
"unsuported db type: {0}",
dbconnections_in.DBServerType.ToString()
)
);
}
}
}