Hi Guys,
It is the first time I use ADO and I cannot really understand how the batch size in this code is being calculated....A brief description would really be helpful.
<%
dim nBatchSize
strSQL = "SELECT setting_value FROM _setting WHERE Setting_Name = 'Interface_Installed'"
SET rsINSTALLED = CreateObject("ADODB.Recordset")
rsINSTALLED.Open strSql, Session("sConnect")
if rsINSTALLED("setting_value") = 0 then
strSQL = "UPDATE Interface_Export SET Path = '\\' + @@SERVERNAME + '\web\mfs\Interface\Files\'"
SET rsUPDATE = CreateObject("ADODB.Recordset")
rsUPDATE.Open strSql, Session("sConnect")
strSQL = "UPDATE _setting SET setting_value = 1 WHERE Setting_Name = 'Interface_Installed'"
SET rsUPDATE = CreateObject("ADODB.Recordset")
rsUPDATE.Open strSql, Session("sConnect")
end if
' New Setting for batch size.
strSQL = "SELECT setting_value FROM _setting WHERE Setting_Name = 'Interface_Out_Batch_Size'"
SET rsBATCHSIZE = CreateObject("ADODB.Recordset")
rsBATCHSIZE.Open strSql, Session("sConnect")
if rsBATCHSIZE.BOF and rsBATCHSIZE.EOF then
' This will setup the batch size if the setting value is missing.
strSQL = "INSERT INTO _setting(Setting_Name, Setting_Value) VALUES('Interface_Out_Batch_Size', 2000) "
SET rsINSERTBATCHSIZE = CreateObject("ADODB.Recordset")
rsINSERTBATCHSIZE.Open strSql, Session("sConnect")
nBatchSize = 2000
else
nBatchSize = cLng(rsBATCHSIZE("setting_value"))
end if
strSQL="SELECT * FROM Interface_Export_Type WHERE Interface_ID = " & request("sType")
SET rsEI = CreateObject("ADODB.Recordset")
rsEI.Open strSql, Session("sConnect")
%>
It is the first time I use ADO and I cannot really understand how the batch size in this code is being calculated....A brief description would really be helpful.
<%
dim nBatchSize
strSQL = "SELECT setting_value FROM _setting WHERE Setting_Name = 'Interface_Installed'"
SET rsINSTALLED = CreateObject("ADODB.Recordset")
rsINSTALLED.Open strSql, Session("sConnect")
if rsINSTALLED("setting_value") = 0 then
strSQL = "UPDATE Interface_Export SET Path = '\\' + @@SERVERNAME + '\web\mfs\Interface\Files\'"
SET rsUPDATE = CreateObject("ADODB.Recordset")
rsUPDATE.Open strSql, Session("sConnect")
strSQL = "UPDATE _setting SET setting_value = 1 WHERE Setting_Name = 'Interface_Installed'"
SET rsUPDATE = CreateObject("ADODB.Recordset")
rsUPDATE.Open strSql, Session("sConnect")
end if
' New Setting for batch size.
strSQL = "SELECT setting_value FROM _setting WHERE Setting_Name = 'Interface_Out_Batch_Size'"
SET rsBATCHSIZE = CreateObject("ADODB.Recordset")
rsBATCHSIZE.Open strSql, Session("sConnect")
if rsBATCHSIZE.BOF and rsBATCHSIZE.EOF then
' This will setup the batch size if the setting value is missing.
strSQL = "INSERT INTO _setting(Setting_Name, Setting_Value) VALUES('Interface_Out_Batch_Size', 2000) "
SET rsINSERTBATCHSIZE = CreateObject("ADODB.Recordset")
rsINSERTBATCHSIZE.Open strSql, Session("sConnect")
nBatchSize = 2000
else
nBatchSize = cLng(rsBATCHSIZE("setting_value"))
end if
strSQL="SELECT * FROM Interface_Export_Type WHERE Interface_ID = " & request("sType")
SET rsEI = CreateObject("ADODB.Recordset")
rsEI.Open strSql, Session("sConnect")
%>