コード例 #1
0
		private void Execute_SQL__delete(cDBConnection dbconnections_in) {
			switch (dbconnections_in.DBServerType) {
				case eDBServerTypes.SQLServer:
				case eDBServerTypes.PostgreSQL: {
						dbconnections_in.Execute_SQLQuery(string.Format(
						"delete from \"User\" where \"Login\" = 'test-{0}'",
						testid_
					));
					break;
				}
				default: {
					throw new Exception(
						string.Format(
							"unsuported db type: {0}",
							dbconnections_in.DBServerType.ToString()
						)
					);
				}
			}
		}
コード例 #2
0
		private void Execute_SQL__insert(cDBConnection dbconnections_in) {
			switch (dbconnections_in.DBServerType) {
				case eDBServerTypes.SQLServer:
				case eDBServerTypes.PostgreSQL: {
					dbconnections_in.Execute_SQLQuery(string.Format(
						"insert into \"User\" (\"Login\", \"Password\") values ('test-{0}', 'password')",
						testid_
					));
					break;
				}
				default: {
					throw new Exception(
						string.Format(
							"unsuported db type: {0}",
							dbconnections_in.DBServerType.ToString()
						)
					);
				}
			}
		}