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

@@ -78,7 +78,7 @@ SELECT idx, gcode, pdate, invtype, uid, dbo.getItemName(item) AS itemName, dbo.g
<DbCommand CommandType="Text" ModifiedByUser="false">
<CommandText>SELECT idx, gcode, pdate, invtype, uid, dbo.getItemName(item) AS itemName, dbo.getItemModel(item) AS itemModel, serial, dr_qty, dr_amt, cr_qty, cr_amt, place, memo, project, projectName, wuid,
wdate, item, box
FROM Inventory
FROM Inventory WITH (NOLOCK)
WHERE (gcode = @gcode)
ORDER BY pdate DESC</CommandText>
<Parameters>
@@ -140,7 +140,7 @@ SELECT idx, gcode, pdate, invtype, uid, dbo.getItemName(item) AS itemName, dbo.g
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_item" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="item" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_box" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="box" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_box" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="box" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="idx" ColumnName="idx" DataSourceName="EE.dbo.Inventory" 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>
@@ -172,11 +172,15 @@ SELECT idx, gcode, pdate, invtype, uid, dbo.getItemName(item) AS itemName, dbo.g
<DbSource ConnectionRef="gwcs (Settings)" DbObjectName="GroupWare.dbo.Inventory" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="FillByDate" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetbyDate" GeneratorSourceName="FillByDate" GetMethodModifier="Public" GetMethodName="GetbyDate" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetbyDate" UserSourceName="FillByDate">
<SelectCommand>
<DbCommand CommandType="Text" ModifiedByUser="true">
<CommandText>SELECT cr_amt, cr_qty, dr_amt, dr_qty, gcode, idx, invtype, item, dbo.getItemModel(item) AS itemModel, dbo.getItemName(item) AS itemName, memo, pdate, place, project, projectName, serial, uid, wdate, wuid FROM Inventory WHERE (gcode = @gcode) AND (pdate BETWEEN @sd AND @ed) ORDER BY pdate DESC</CommandText>
<CommandText>SELECT cr_amt, cr_qty, dr_amt, dr_qty, gcode, idx, invtype, item, dbo.getItemModel(item) AS itemModel, dbo.getItemName(item) AS itemName, memo, pdate, place, project, projectName, serial, uid,
wdate, wuid
FROM Inventory WITH (NOLOCK)
WHERE (gcode = @gcode) AND (pdate BETWEEN @sd AND @ed)
ORDER BY pdate DESC</CommandText>
<Parameters>
<Parameter AllowDbNull="false" AutogeneratedName="gcode" ColumnName="gcode" DataSourceName="GroupWare.dbo.Inventory" 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="sd" ColumnName="pdate" DataSourceName="GroupWare.dbo.Inventory" DataTypeServer="varchar(10)" DbType="AnsiString" Direction="Input" ParameterName="@sd" Precision="0" ProviderType="VarChar" Scale="0" Size="10" SourceColumn="pdate" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="ed" ColumnName="pdate" DataSourceName="GroupWare.dbo.Inventory" DataTypeServer="varchar(10)" DbType="AnsiString" Direction="Input" ParameterName="@ed" Precision="0" ProviderType="VarChar" Scale="0" Size="10" SourceColumn="pdate" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="gcode" ColumnName="gcode" DataSourceName="EE.dbo.Inventory" 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="sd" ColumnName="pdate" DataSourceName="EE.dbo.Inventory" DataTypeServer="varchar(10)" DbType="AnsiString" Direction="Input" ParameterName="@sd" Precision="0" ProviderType="VarChar" Scale="0" Size="10" SourceColumn="pdate" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="ed" ColumnName="pdate" DataSourceName="EE.dbo.Inventory" DataTypeServer="varchar(10)" DbType="AnsiString" Direction="Input" ParameterName="@ed" Precision="0" ProviderType="VarChar" Scale="0" Size="10" SourceColumn="pdate" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</SelectCommand>
@@ -186,14 +190,14 @@ SELECT idx, gcode, pdate, invtype, uid, dbo.getItemName(item) AS itemName, dbo.g
<DbCommand CommandType="Text" ModifiedByUser="true">
<CommandText>SELECT idx, gcode, pdate, invtype, uid, dbo.getItemName(item) AS itemName, dbo.getItemModel(item) AS itemModel, serial, dr_qty, dr_amt, cr_qty, cr_amt, place, memo, project, projectName, wuid,
wdate, item
FROM Inventory
FROM Inventory WITH (NOLOCK)
WHERE (gcode = @gcode) AND (pdate BETWEEN @sd AND @ed) AND (item = @item)
ORDER BY pdate DESC</CommandText>
<Parameters>
<Parameter AllowDbNull="false" AutogeneratedName="gcode" ColumnName="gcode" DataSourceName="GroupWare.dbo.Inventory" 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="sd" ColumnName="pdate" DataSourceName="GroupWare.dbo.Inventory" DataTypeServer="varchar(10)" DbType="AnsiString" Direction="Input" ParameterName="@sd" Precision="0" ProviderType="VarChar" Scale="0" Size="10" SourceColumn="pdate" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="ed" ColumnName="pdate" DataSourceName="GroupWare.dbo.Inventory" DataTypeServer="varchar(10)" DbType="AnsiString" Direction="Input" ParameterName="@ed" Precision="0" ProviderType="VarChar" Scale="0" Size="10" SourceColumn="pdate" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="item" ColumnName="item" DataSourceName="GroupWare.dbo.Inventory" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@item" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="item" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="gcode" ColumnName="gcode" DataSourceName="EE.dbo.Inventory" 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="sd" ColumnName="pdate" DataSourceName="EE.dbo.Inventory" DataTypeServer="varchar(10)" DbType="AnsiString" Direction="Input" ParameterName="@sd" Precision="0" ProviderType="VarChar" Scale="0" Size="10" SourceColumn="pdate" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="ed" ColumnName="pdate" DataSourceName="EE.dbo.Inventory" DataTypeServer="varchar(10)" DbType="AnsiString" Direction="Input" ParameterName="@ed" Precision="0" ProviderType="VarChar" Scale="0" Size="10" SourceColumn="pdate" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="item" ColumnName="item" DataSourceName="EE.dbo.Inventory" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@item" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="item" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</SelectCommand>
@@ -201,12 +205,16 @@ ORDER BY pdate DESC</CommandText>
<DbSource ConnectionRef="gwcs (Settings)" DbObjectName="GroupWare.dbo.Inventory" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="FillByUid" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetByUid" GeneratorSourceName="FillByUid" GetMethodModifier="Public" GetMethodName="GetByUid" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetByUid" UserSourceName="FillByUid">
<SelectCommand>
<DbCommand CommandType="Text" ModifiedByUser="true">
<CommandText>SELECT cr_amt, cr_qty, dr_amt, dr_qty, gcode, idx, invtype, item, dbo.getItemModel(item) AS itemModel, dbo.getItemName(item) AS itemName, memo, pdate, place, project, projectName, serial, uid, wdate, wuid FROM Inventory WHERE (gcode = @gcode) AND (pdate BETWEEN @sd AND @ed) AND (uid = @uid) ORDER BY pdate DESC</CommandText>
<CommandText>SELECT cr_amt, cr_qty, dr_amt, dr_qty, gcode, idx, invtype, item, dbo.getItemModel(item) AS itemModel, dbo.getItemName(item) AS itemName, memo, pdate, place, project, projectName, serial, uid,
wdate, wuid
FROM Inventory WITH (NOLOCK)
WHERE (gcode = @gcode) AND (pdate BETWEEN @sd AND @ed) AND (uid = @uid)
ORDER BY pdate DESC</CommandText>
<Parameters>
<Parameter AllowDbNull="false" AutogeneratedName="gcode" ColumnName="gcode" DataSourceName="GroupWare.dbo.Inventory" 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="sd" ColumnName="pdate" DataSourceName="GroupWare.dbo.Inventory" DataTypeServer="varchar(10)" DbType="AnsiString" Direction="Input" ParameterName="@sd" Precision="0" ProviderType="VarChar" Scale="0" Size="10" SourceColumn="pdate" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="ed" ColumnName="pdate" DataSourceName="GroupWare.dbo.Inventory" DataTypeServer="varchar(10)" DbType="AnsiString" Direction="Input" ParameterName="@ed" Precision="0" ProviderType="VarChar" Scale="0" Size="10" SourceColumn="pdate" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="uid" ColumnName="uid" DataSourceName="GroupWare.dbo.Inventory" DataTypeServer="varchar(20)" DbType="AnsiString" Direction="Input" ParameterName="@uid" Precision="0" ProviderType="VarChar" Scale="0" Size="20" SourceColumn="uid" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="gcode" ColumnName="gcode" DataSourceName="EE.dbo.Inventory" 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="sd" ColumnName="pdate" DataSourceName="EE.dbo.Inventory" DataTypeServer="varchar(10)" DbType="AnsiString" Direction="Input" ParameterName="@sd" Precision="0" ProviderType="VarChar" Scale="0" Size="10" SourceColumn="pdate" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="ed" ColumnName="pdate" DataSourceName="EE.dbo.Inventory" DataTypeServer="varchar(10)" DbType="AnsiString" Direction="Input" ParameterName="@ed" Precision="0" ProviderType="VarChar" Scale="0" Size="10" SourceColumn="pdate" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="uid" ColumnName="uid" DataSourceName="EE.dbo.Inventory" DataTypeServer="varchar(20)" DbType="AnsiString" Direction="Input" ParameterName="@uid" Precision="0" ProviderType="VarChar" Scale="0" Size="20" SourceColumn="uid" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</SelectCommand>
@@ -558,7 +566,7 @@ and item = @item</CommandText>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="placebox" msdata:ReadOnly="true" msdata:Expression="place + '_' + box" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInTable="placeboxColumn" msprop:Generator_ColumnVarNameInTable="columnplacebox" msprop:Generator_UserColumnName="placebox" msprop:Generator_ColumnPropNameInRow="placebox" type="xs:string" minOccurs="0" />
<xs:element name="placebox" msdata:ReadOnly="true" msdata:Expression="place + '_' + box" msprop:Generator_ColumnPropNameInTable="placeboxColumn" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="placebox" msprop:Generator_UserColumnName="placebox" msprop:Generator_ColumnVarNameInTable="columnplacebox" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>