サー、私は vb6.0 と sql サーバー 2005 を使用しています。私は小さな手順を書き、SQL サーバーですぐに結果を返しますが、vb 6.0 ではタイムアウトを返します。体のアイデアはありますか?助けてください?
私の手順:
Alter procedure
[dbo].[SpRptSalesDayBookSummary](@liComid integer,@liPerid integer,@ad_dtfrm DateTime,@ad_dtto DateTime)
AS
begin
SET NOCOUNT ON;
Select SaleDate,Sum(Grand) as tot
from SalesMaster a,SalesDet b
Where a.id=b.RefId
And a.CompanyId= @liComid
And a.PeriodId=@liPerid
And a.SaleDate Between @ad_dtfrm And @ad_dtto
Group By SaleDate Order By SaleDate
End
私のvbコード:
Dim cmd As New ADODB.Command
Dim rs1 As New ADODB.Recordset
Dim param2 As ADODB.Parameter
Dim param3 As ADODB.Parameter
Dim param4 As ADODB.Parameter
Dim param5 As ADODB.Parameter
g_objData.DBConn.CursorLocation = adUseClient
Set cmd.ActiveConnection = g_objData.DBConn
cmd.CommandType = adCmdStoredProc
cmd.CommandText = "SpRptSalesDayBookSummary"
Set param2 = cmd.CreateParameter("Input", adInteger, adParamInput)
cmd.Parameters.Append param2
param2.value = 20
Set param3 = cmd.CreateParameter("Input", adInteger, adParamInput)
cmd.Parameters.Append param3
param3.value = 8
Set param4 = cmd.CreateParameter("Input", adDate, adParamInput)
cmd.Parameters.Append param4
param4.value = Format(PD_DtFrm, "yyyy-mm-dd")
Set param5 = cmd.CreateParameter("Input", adDate, adParamInput)
cmd.Parameters.Append param5
param5.value = Format(PD_DtTo, "yyyy-mm-dd")
Set rs1 = cmd.Execute
助けてください。