database query : add with(nolock)

This commit is contained in:
chi
2024-01-30 10:05:52 +09:00
parent ed37fd6c40
commit 3c86087f76
53 changed files with 6656 additions and 6423 deletions

View File

@@ -10991,7 +10991,8 @@ SELECT idx, name, sid, model, manu, supply, price, memo, wuid, wdate, cate, supp
this._commandCollection[0].Connection = this.Connection;
this._commandCollection[0].CommandText = "SELECT idx, name, sid, model, manu, supply, price, memo, wuid, wdate, cate, supp" +
"lyidx, scale, unit, disable, bparam1, iparam1, import, gcode, priceD, Storage, b" +
"arcode\r\nFROM Items\r\nWHERE (gcode = @gcode)\r\nORDER BY cate, name, idx";
"arcode\r\nFROM Items WITH (NOLOCK)\r\nWHERE (gcode = @gcode)\r\nORDER BY cate, na" +
"me, idx";
this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
this._commandCollection[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@gcode", global::System.Data.SqlDbType.VarChar, 10, global::System.Data.ParameterDirection.Input, 0, 0, "gcode", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand();
@@ -11018,14 +11019,14 @@ SELECT idx, name, sid, model, manu, supply, price, memo, wuid, wdate, cate, supp
this._commandCollection[4].Connection = this.Connection;
this._commandCollection[4].CommandText = "SELECT idx, name, sid, model, manu, supply, price, memo, wuid, wdate, cate, supp" +
"lyidx, scale, unit, disable, bparam1, iparam1, import, gcode, priceD, Storage, b" +
"arcode\r\nFROM Items\r\nWHERE (gcode = @gcode) and sid = @sid";
"arcode\r\nFROM Items WITH (NOLOCK)\r\nWHERE (gcode = @gcode) AND (sid = @sid)";
this._commandCollection[4].CommandType = global::System.Data.CommandType.Text;
this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@gcode", global::System.Data.SqlDbType.VarChar, 10, global::System.Data.ParameterDirection.Input, 0, 0, "gcode", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@sid", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, "sid", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[5] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[5].Connection = this.Connection;
this._commandCollection[5].CommandText = @"SELECT bparam1, cate, disable, gcode, idx, import, iparam1, manu, memo, model, name, price, scale, sid, supply, supplyidx, unit, wdate, wuid, priceD, Storage, barcode
FROM Items
FROM Items WITH (NOLOCK)
WHERE (sid IN
(SELECT sid
FROM Items AS Items_1
@@ -11038,7 +11039,7 @@ ORDER BY sid, name, idx";
this._commandCollection[6] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[6].Connection = this.Connection;
this._commandCollection[6].CommandText = @"SELECT bparam1, cate, disable, gcode, idx, import, iparam1, manu, memo, model, name, price, scale, sid, supply, supplyidx, unit, wdate, wuid, priceD, Storage, barcode
FROM Items
FROM Items WITH (NOLOCK)
WHERE (gcode = @code) AND (ISNULL(cate, N'') LIKE @cate) AND (ISNULL(name, N'') LIKE @search OR
ISNULL(model, N'') LIKE @search OR
ISNULL(sid, N'') LIKE @search OR
@@ -11051,7 +11052,7 @@ ORDER BY name, idx";
this._commandCollection[7] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[7].Connection = this.Connection;
this._commandCollection[7].CommandText = @"SELECT bparam1, cate, disable, gcode, idx, import, iparam1, manu, memo, model, name, price, scale, sid, supply, supplyidx, unit, wdate, wuid, priceD, Storage, barcode
FROM Items
FROM Items WITH (NOLOCK)
WHERE (ISNULL(name, N'') LIKE @search OR
ISNULL(sid, N'') LIKE @search OR
ISNULL(manu, N'') LIKE @search OR
@@ -11068,7 +11069,7 @@ ORDER BY name, idx";
this._commandCollection[8] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[8].Connection = this.Connection;
this._commandCollection[8].CommandText = @"SELECT Storage, barcode, bparam1, cate, disable, gcode, idx, import, iparam1, manu, memo, model, name, price, priceD, scale, sid, supply, supplyidx, unit, wdate, wuid
FROM Items
FROM Items WITH (NOLOCK)
WHERE (ISNULL(name, N'') LIKE @search OR
ISNULL(sid, N'') LIKE @search OR
ISNULL(manu, N'') LIKE @search OR
@@ -11084,21 +11085,22 @@ ORDER BY name, idx";
this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@gcode", global::System.Data.SqlDbType.VarChar, 10, global::System.Data.ParameterDirection.Input, 0, 0, "gcode", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[9] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[9].Connection = this.Connection;
this._commandCollection[9].CommandText = "SELECT Storage\r\nFROM Items\r\nWHERE (gcode = @gcode) AND (ISNULL(disable, 0) " +
"= 0) AND (ISNULL(Storage, \'\') <> \'\')\r\nGROUP BY Storage\r\nORDER BY Storage";
this._commandCollection[9].CommandText = "SELECT Storage\r\nFROM Items WITH (NOLOCK)\r\nWHERE (gcode = @gcode) AND (ISNUL" +
"L(disable, 0) = 0) AND (ISNULL(Storage, \'\') <> \'\')\r\nGROUP BY Storage\r\nORDER BY S" +
"torage";
this._commandCollection[9].CommandType = global::System.Data.CommandType.Text;
this._commandCollection[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@gcode", global::System.Data.SqlDbType.VarChar, 10, global::System.Data.ParameterDirection.Input, 0, 0, "gcode", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[10] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[10].Connection = this.Connection;
this._commandCollection[10].CommandText = "SELECT bparam1, cate, disable, gcode, idx, import, iparam1, manu, memo, model, n" +
"ame, price, scale, sid, supply, supplyidx, unit, wdate, wuid, priceD, Storage, b" +
"arcode\r\nFROM Items\r\nWHERE (idx = @idx)";
"arcode\r\nFROM Items WITH (NOLOCK)\r\nWHERE (idx = @idx)";
this._commandCollection[10].CommandType = global::System.Data.CommandType.Text;
this._commandCollection[10].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idx", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "idx", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[11] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[11].Connection = this.Connection;
this._commandCollection[11].CommandText = "SELECT ISNULL(idx, - 1) AS Expr1\r\nFROM Items\r\nWHERE (gcode = @gcode) AND (I" +
"SNULL(name, N\'\') = @name) AND (ISNULL(model, N\'\') = @model)";
this._commandCollection[11].CommandText = "SELECT ISNULL(idx, - 1) AS Expr1\r\nFROM Items WITH (NOLOCK)\r\nWHERE (gcode = " +
"@gcode) AND (ISNULL(name, N\'\') = @name) AND (ISNULL(model, N\'\') = @model)";
this._commandCollection[11].CommandType = global::System.Data.CommandType.Text;
this._commandCollection[11].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@gcode", global::System.Data.SqlDbType.VarChar, 10, global::System.Data.ParameterDirection.Input, 0, 0, "gcode", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[11].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@name", global::System.Data.SqlDbType.NVarChar, 1024, global::System.Data.ParameterDirection.Input, 0, 0, "", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
@@ -12675,7 +12677,8 @@ SELECT idx, grp, code, svalue, ivalue, fvalue, memo, wuid, wdate, gcode FROM Com
this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[0].Connection = this.Connection;
this._commandCollection[0].CommandText = "SELECT idx, grp, code, svalue, ivalue, fvalue, memo, wuid, wdate, gcode\r\nFROM " +
" Common\r\nWHERE (grp = @grpCode) AND (gcode = @gcode)\r\nORDER BY grp, memo";
" Common WITH (nolock)\r\nWHERE (grp = @grpCode) AND (gcode = @gcode)\r\nORDER BY g" +
"rp, memo";
this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
this._commandCollection[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@grpCode", global::System.Data.SqlDbType.VarChar, 10, global::System.Data.ParameterDirection.Input, 0, 0, "grp", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@gcode", global::System.Data.SqlDbType.VarChar, 10, global::System.Data.ParameterDirection.Input, 0, 0, "gcode", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
@@ -13322,7 +13325,7 @@ SELECT idx, bidx, header, cate, title, contents, [file], guid, url, wuid, wdate,
this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[0].Connection = this.Connection;
this._commandCollection[0].CommandText = @"SELECT idx, bidx, header, cate, title, contents, [file], guid, url, wuid, wdate, project, pidx, gcode, [close], remark, dbo.getUserName(wuid) AS wuid_name
FROM Board
FROM Board WITH (nolock)
WHERE (bidx = @bidx) AND (ISNULL(header, 0) = 0) AND (gcode LIKE @gcode)
ORDER BY wdate";
this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
@@ -20135,7 +20138,8 @@ SELECT idx, gcode, cate, title, body, wuid, wdate FROM EETGW_DocuForm WHERE (idx
this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[0].Connection = this.Connection;
this._commandCollection[0].CommandText = "select * from eetgw_docuform\r\nwhere gcode =@gcode\r\norder by cate,title";
this._commandCollection[0].CommandText = "SELECT idx, gcode, cate, title, body, wuid, wdate\r\nFROM EETGW_DocuForm WITH " +
"(nolock)\r\nWHERE (gcode = @gcode)\r\nORDER BY cate, title";
this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
this._commandCollection[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@gcode", global::System.Data.SqlDbType.VarChar, 10, global::System.Data.ParameterDirection.Input, 0, 0, "gcode", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
}