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

@@ -9,7 +9,7 @@
<Tables>
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="minutesTableAdapter" GeneratorDataComponentClassName="minutesTableAdapter" Name="minutes" UserDataComponentName="minutesTableAdapter">
<MainSource>
<DbSource ConnectionRef="gwcs (Settings)" DbObjectName="GroupWare.dbo.minutes" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
<DbSource ConnectionRef="gwcs (Settings)" DbObjectName="EE.dbo.minutes" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
<DeleteCommand>
<DbCommand CommandType="Text" ModifiedByUser="false">
<CommandText>DELETE FROM [minutes] WHERE (([idx] = @Original_idx) AND ((@IsNull_stime = 1 AND [stime] IS NULL) OR ([stime] = @Original_stime)) AND ((@IsNull_etime = 1 AND [etime] IS NULL) OR ([etime] = @Original_etime)) AND ((@IsNull_title = 1 AND [title] IS NULL) OR ([title] = @Original_title)) AND ((@IsNull_place = 1 AND [place] IS NULL) OR ([place] = @Original_place)) AND ((@IsNull_project = 1 AND [project] IS NULL) OR ([project] = @Original_project)) AND ((@IsNull_main = 1 AND [main] IS NULL) OR ([main] = @Original_main)) AND ((@IsNull_sub = 1 AND [sub] IS NULL) OR ([sub] = @Original_sub)) AND ([wuid] = @Original_wuid) AND ([wdate] = @Original_wdate))</CommandText>
@@ -55,8 +55,8 @@ SELECT idx, stime, etime, title, place, contents, project, main, sub, memo, wuid
</InsertCommand>
<SelectCommand>
<DbCommand CommandType="Text" ModifiedByUser="false">
<CommandText>SELECT minutes.*
FROM minutes</CommandText>
<CommandText>SELECT idx, stime, etime, title, place, contents, project, main, sub, memo, wuid, wdate
FROM minutes WITH (NOLOCK)</CommandText>
<Parameters />
</DbCommand>
</SelectCommand>
@@ -116,10 +116,12 @@ SELECT idx, stime, etime, title, place, contents, project, main, sub, memo, wuid
<Sources>
<DbSource ConnectionRef="gwcs (Settings)" DbObjectName="EE.dbo.minutes" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="FillByIDX" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetbyIDX" GeneratorSourceName="FillByIDX" GetMethodModifier="Public" GetMethodName="GetbyIDX" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetbyIDX" UserSourceName="FillByIDX">
<SelectCommand>
<DbCommand CommandType="Text" ModifiedByUser="false">
<CommandText>SELECT contents, etime, idx, main, memo, place, project, stime, sub, title, wdate, wuid FROM minutes WHERE (idx = @idx)</CommandText>
<DbCommand CommandType="Text" ModifiedByUser="true">
<CommandText>SELECT contents, etime, idx, main, memo, place, project, stime, sub, title, wdate, wuid
FROM minutes WITH (NOLOCK)
WHERE (idx = @idx)</CommandText>
<Parameters>
<Parameter AllowDbNull="false" AutogeneratedName="idx" ColumnName="idx" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@idx" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="idx" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="idx" ColumnName="idx" DataSourceName="EE.dbo.minutes" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@idx" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="idx" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</SelectCommand>
@@ -128,7 +130,7 @@ SELECT idx, stime, etime, title, place, contents, project, main, sub, memo, wuid
</TableAdapter>
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="BoardTableAdapter" GeneratorDataComponentClassName="BoardTableAdapter" Name="Board" UserDataComponentName="BoardTableAdapter">
<MainSource>
<DbSource ConnectionRef="gwcs (Settings)" DbObjectName="GroupWare.dbo.Board" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
<DbSource ConnectionRef="gwcs (Settings)" DbObjectName="EE.dbo.Board" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
<DeleteCommand>
<DbCommand CommandType="Text" ModifiedByUser="false">
<CommandText>DELETE FROM [Board] WHERE (([idx] = @Original_idx) AND ((@IsNull_bidx = 1 AND [bidx] IS NULL) OR ([bidx] = @Original_bidx)) AND ((@IsNull_header = 1 AND [header] IS NULL) OR ([header] = @Original_header)) AND ((@IsNull_cate = 1 AND [cate] IS NULL) OR ([cate] = @Original_cate)) AND ((@IsNull_title = 1 AND [title] IS NULL) OR ([title] = @Original_title)) AND ((@IsNull_file = 1 AND [file] IS NULL) OR ([file] = @Original_file)) AND ((@IsNull_guid = 1 AND [guid] IS NULL) OR ([guid] = @Original_guid)) AND ([wuid] = @Original_wuid) AND ([wdate] = @Original_wdate))</CommandText>
@@ -171,10 +173,10 @@ SELECT idx, bidx, header, cate, title, contents, [file], guid, wuid, wdate FROM
<SelectCommand>
<DbCommand CommandType="Text" ModifiedByUser="false">
<CommandText>SELECT idx, bidx, header, cate, title, contents, [file], guid, wuid, wdate
FROM Board
FROM Board WITH (NOLOCK)
WHERE (bidx = @bidx)</CommandText>
<Parameters>
<Parameter AllowDbNull="true" AutogeneratedName="bidx" ColumnName="bidx" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@bidx" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="bidx" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="bidx" ColumnName="bidx" DataSourceName="EE.dbo.Board" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@bidx" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="bidx" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</SelectCommand>
@@ -307,7 +309,7 @@ SELECT idx, cate, result, sdate, edate, term, title, contents, uid, tolist, mail
<DbCommand CommandType="Text" ModifiedByUser="false">
<CommandText>SELECT idx, cate, result, sdate, edate, term, title, contents, uid, tolist, mail, mailsend, reason, wuid, wdate, termDr, gcode, DrTime, CrTime, dbo.getUserName(uid) AS UserName, tag, extcate, extidx,
lock
FROM Holyday
FROM Holyday WITH (NOLOCK)
WHERE (sdate &gt;= @sd) AND (gcode = @gcode) AND (uid LIKE @uid) AND (sdate &lt;= @ed) AND (cate LIKE @cate)
ORDER BY sdate, edate, uid, idx</CommandText>
<Parameters>
@@ -420,7 +422,7 @@ SELECT idx, cate, result, sdate, edate, term, title, contents, uid, tolist, mail
<DbCommand CommandType="Text" ModifiedByUser="true">
<CommandText>SELECT CrTime, DrTime, dbo.getUserName(uid) AS UserName, cate, contents, edate, extcate, extidx, gcode, idx, lock, mail, mailsend, reason, result, sdate, tag, term, termDr, title, tolist, uid, wdate,
wuid
FROM Holyday
FROM Holyday WITH (NOLOCK)
WHERE (gcode = @gcode) AND (sdate BETWEEN @sd AND @ed) OR
(gcode = @gcode) AND (edate BETWEEN @sd AND @ed)
ORDER BY sdate, edate, uid</CommandText>
@@ -448,7 +450,10 @@ ORDER BY sdate, edate, uid</CommandText>
<DbSource ConnectionRef="gwcs (Settings)" DbObjectName="EE.dbo.Holyday" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="FillByIdx" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetbyIdx" GeneratorSourceName="FillByIdx" GetMethodModifier="Public" GetMethodName="GetbyIdx" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetbyIdx" UserSourceName="FillByIdx">
<SelectCommand>
<DbCommand CommandType="Text" ModifiedByUser="true">
<CommandText>SELECT CrTime, DrTime, dbo.getUserName(uid) AS UserName, cate, contents, edate, extcate, extidx, gcode, idx, lock, mail, mailsend, reason, result, sdate, tag, term, termDr, title, tolist, uid, wdate, wuid FROM Holyday WHERE (gcode = @gcode) AND (idx = @idx)</CommandText>
<CommandText>SELECT CrTime, DrTime, dbo.getUserName(uid) AS UserName, cate, contents, edate, extcate, extidx, gcode, idx, lock, mail, mailsend, reason, result, sdate, tag, term, termDr, title, tolist, uid, wdate,
wuid
FROM Holyday WITH (NOLOCK)
WHERE (gcode = @gcode) AND (idx = @idx)</CommandText>
<Parameters>
<Parameter AllowDbNull="false" AutogeneratedName="gcode" ColumnName="gcode" DataSourceName="EE.dbo.Holyday" DataTypeServer="varchar(10)" DbType="AnsiString" Direction="Input" ParameterName="@gcode" Precision="0" ProviderType="VarChar" Scale="0" Size="10" SourceColumn="gcode" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="idx" ColumnName="idx" DataSourceName="EE.dbo.Holyday" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@idx" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="idx" SourceColumnNullMapping="false" SourceVersion="Current" />
@@ -555,9 +560,9 @@ ORDER BY pdate DESC, uid</CommandText>
<MainSource>
<DbSource ConnectionRef="gwcs (Settings)" DbObjectName="EE.dbo.EETGW_WorkTableUser" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="false" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
<SelectCommand>
<DbCommand CommandType="Text" ModifiedByUser="true">
<DbCommand CommandType="Text" ModifiedByUser="false">
<CommandText>SELECT grp
FROM EETGW_WorkTableUser
FROM EETGW_WorkTableUser WITH (NOLOCK)
WHERE (gcode = @gcode)
GROUP BY grp
ORDER BY grp</CommandText>
@@ -622,7 +627,7 @@ SELECT idx, gcode, grp, seq, grade, empno, name, wuid, wdate, indate, email FROM
<SelectCommand>
<DbCommand CommandType="Text" ModifiedByUser="false">
<CommandText>SELECT idx, gcode, grp, seq, grade, empno, name, wuid, wdate, indate, email
FROM EETGW_WorkTableUser
FROM EETGW_WorkTableUser WITH (NOLOCK)
WHERE (gcode = @gcode) AND (grp = @grp)
ORDER BY seq</CommandText>
<Parameters>
@@ -664,7 +669,7 @@ SELECT idx, gcode, grp, seq, grade, empno, name, wuid, wdate, indate, email FROM
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_indate" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="indate" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_email" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="email" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_email" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="email" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="idx" ColumnName="idx" DataSourceName="EE.dbo.EETGW_WorkTableUser" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@idx" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="idx" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="idx" ColumnName="idx" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@idx" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="idx" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</UpdateCommand>
@@ -687,7 +692,9 @@ SELECT idx, gcode, grp, seq, grade, empno, name, wuid, wdate, indate, email FROM
<DbSource ConnectionRef="gwcs (Settings)" DbObjectName="EE.dbo.EETGW_WorkTableUser" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="FillbyEmpNo" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetbyEmpNo" GeneratorSourceName="FillbyEmpNo" GetMethodModifier="Public" GetMethodName="GetbyEmpNo" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetbyEmpNo" UserSourceName="FillbyEmpNo">
<SelectCommand>
<DbCommand CommandType="Text" ModifiedByUser="true">
<CommandText>SELECT email, empno, gcode, grade, grp, idx, indate, name, seq, wdate, wuid FROM EETGW_WorkTableUser WHERE (gcode = @gcode) AND (empno = @empno)</CommandText>
<CommandText>SELECT email, empno, gcode, grade, grp, idx, indate, name, seq, wdate, wuid
FROM EETGW_WorkTableUser WITH (NOLOCK)
WHERE (gcode = @gcode) AND (empno = @empno)</CommandText>
<Parameters>
<Parameter AllowDbNull="false" AutogeneratedName="gcode" ColumnName="gcode" DataSourceName="EE.dbo.EETGW_WorkTableUser" DataTypeServer="varchar(10)" DbType="AnsiString" Direction="Input" ParameterName="@gcode" Precision="0" ProviderType="VarChar" Scale="0" Size="10" SourceColumn="gcode" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="empno" ColumnName="empno" DataSourceName="EE.dbo.EETGW_WorkTableUser" DataTypeServer="varchar(10)" DbType="AnsiString" Direction="Input" ParameterName="@empno" Precision="0" ProviderType="VarChar" Scale="0" Size="10" SourceColumn="empno" SourceColumnNullMapping="false" SourceVersion="Current" />
@@ -826,9 +833,9 @@ SELECT idx, pdate, free, memo, wuid, wdate FROM HolidayLIst WHERE (idx = @idx) O
<MainSource>
<DbSource ConnectionRef="gwcs (Settings)" DbObjectName="EE.dbo.Holyday" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="false" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
<SelectCommand>
<DbCommand CommandType="Text" ModifiedByUser="true">
<CommandText>SELECT uid, dbo.getUserName(uid) AS UserName
FROM Holyday
<DbCommand CommandType="Text" ModifiedByUser="false">
<CommandText>SELECT uid, dbo.getUserName(uid) AS UserName
FROM Holyday WITH (NOLOCK)
WHERE (gcode = @gcode) AND (sdate &gt;= @sd) AND (sdate &lt;= @ed)
GROUP BY uid
ORDER BY UserName</CommandText>
@@ -1165,7 +1172,7 @@ WHERE (gcode = @gcode) AND (uid = @uid) AND (CONVERT(CHAR(10), sdate, 23) &gt;=
<xs:element name="WorkTableGrp" msprop:Generator_RowEvHandlerName="WorkTableGrpRowChangeEventHandler" msprop:Generator_RowDeletedName="WorkTableGrpRowDeleted" msprop:Generator_RowDeletingName="WorkTableGrpRowDeleting" msprop:Generator_RowEvArgName="WorkTableGrpRowChangeEvent" msprop:Generator_TablePropName="WorkTableGrp" msprop:Generator_RowChangedName="WorkTableGrpRowChanged" msprop:Generator_UserTableName="WorkTableGrp" msprop:Generator_RowChangingName="WorkTableGrpRowChanging" msprop:Generator_RowClassName="WorkTableGrpRow" msprop:Generator_TableClassName="WorkTableGrpDataTable" msprop:Generator_TableVarName="tableWorkTableGrp">
<xs:complexType>
<xs:sequence>
<xs:element name="grp" msprop:Generator_ColumnPropNameInTable="grpColumn" msprop:Generator_ColumnPropNameInRow="grp" msprop:Generator_UserColumnName="grp" msprop:Generator_ColumnVarNameInTable="columngrp">
<xs:element name="grp" msprop:Generator_ColumnPropNameInTable="grpColumn" msprop:Generator_ColumnPropNameInRow="grp" msprop:Generator_UserColumnName="grp" msprop:Generator_ColumnVarNameInTable="columngrp" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="100" />
@@ -1411,7 +1418,7 @@ WHERE (gcode = @gcode) AND (uid = @uid) AND (CONVERT(CHAR(10), sdate, 23) &gt;=
<xs:element name="HolydayUserList" msprop:Generator_RowEvHandlerName="HolydayUserListRowChangeEventHandler" msprop:Generator_RowDeletedName="HolydayUserListRowDeleted" msprop:Generator_RowDeletingName="HolydayUserListRowDeleting" msprop:Generator_RowEvArgName="HolydayUserListRowChangeEvent" msprop:Generator_TablePropName="HolydayUserList" msprop:Generator_RowChangedName="HolydayUserListRowChanged" msprop:Generator_UserTableName="HolydayUserList" msprop:Generator_RowChangingName="HolydayUserListRowChanging" msprop:Generator_RowClassName="HolydayUserListRow" msprop:Generator_TableClassName="HolydayUserListDataTable" msprop:Generator_TableVarName="tableHolydayUserList">
<xs:complexType>
<xs:sequence>
<xs:element name="uid" msprop:Generator_ColumnPropNameInTable="uidColumn" msprop:Generator_ColumnPropNameInRow="uid" msprop:Generator_UserColumnName="uid" msprop:Generator_ColumnVarNameInTable="columnuid">
<xs:element name="uid" msprop:Generator_ColumnPropNameInTable="uidColumn" msprop:Generator_ColumnPropNameInRow="uid" msprop:Generator_UserColumnName="uid" msprop:Generator_ColumnVarNameInTable="columnuid" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="20" />