void ExecuteNonQuery(str strsql)
{
;
if (!strsql)
throw error("SQL语句不存在");
command.set_CommandText(strsql);
command.ExecuteNonQuery();
}
void ExecuteReader(str strsql)
{
;
if (!strsql)
throw error("SQL语句不存在");
command.set_CommandText(strsql);
reader = command.ExecuteReader();
}
void open(str _serverId = sysSqlSystemInfo::construct().getLoginServer(),
str _dataId = sysSqlSystemInfo::construct().getloginDatabase(),
str _userId = "xxxx",
str _pwd = "********")
{
str connectionStr;
;
connectionStr = "Data Source="+ _serverId + "; Initial Catalog=" + _dataId +";" +
" Persist Security Info = True;User ID=" + _userId +"; Password=" + _pwd;
cnn = new System.Data.SqlClient.SqlConnection(connectionStr);
cnn.Open();
command = cnn.CreateCommand();
command.set_CommandTimeout(3600);
}
public System.Data.SqlClient.SqlCommand parmCommand(System.Data.SqlClient.SqlCommand _command = command)
{
;
command = _command;
return command;
}
public System.Data.SqlClient.SqlDataReader parmReader(System.Data.SqlClient.SqlDataReader _reader = reader)
{
;
reader = _reader;
return reader;
}