sqldevrequiretektips
Programmer
Dim rsDowload As ADODB.Recordset
clsMvSQLServerSP.CreateStoredProcedure sqlDB ( This Method Executed for creating Storeprocedure and sqlDB it's string variable which has some where clause long expression )
clsMvSQLServerSP.ExecuteStroedProcedure rsDowload
(This Method Executed for execute the store procedure)
after Above steps done i have all the records which i needed in rsdowload(Recordset)
Now i have table name tblWIActCat_WIday which is local Access table and I trying to insert all this records from rsdownload (recordset)...
If Not (rsdownload.BOF And rsdownload.EOF) Then rsdownload.MoveFirst
Do While Not rsDowload.EOF
strSQL = "Insert into tblWIActCat_WIday(CustLifeNo,WIActCatId,WIDayId,WeekNo) Values (" & "'" & rsDowload.Fields(0).value & "'" & "," & "'" & rsDowload.Fields(1).value & "'" & "," & "'" & rsDowload.Fields(2).value & "'" & "," & "'" & rsDowload.Fields(3).value & "'" & ")"
scon.Execute strSQL, , adCmdText + adExecuteNoRecords
rsDowload.MoveNext
Loop
Above code taking so long to complete the loop cause rsdoload (recordset) has more then 30000 records,
Is any body give me better solution where i can improve the perfomance...
What's quickest way to insert the records in table from recordset.......
Any help would really appriciate...
Thanks
AD
clsMvSQLServerSP.CreateStoredProcedure sqlDB ( This Method Executed for creating Storeprocedure and sqlDB it's string variable which has some where clause long expression )
clsMvSQLServerSP.ExecuteStroedProcedure rsDowload
(This Method Executed for execute the store procedure)
after Above steps done i have all the records which i needed in rsdowload(Recordset)
Now i have table name tblWIActCat_WIday which is local Access table and I trying to insert all this records from rsdownload (recordset)...
If Not (rsdownload.BOF And rsdownload.EOF) Then rsdownload.MoveFirst
Do While Not rsDowload.EOF
strSQL = "Insert into tblWIActCat_WIday(CustLifeNo,WIActCatId,WIDayId,WeekNo) Values (" & "'" & rsDowload.Fields(0).value & "'" & "," & "'" & rsDowload.Fields(1).value & "'" & "," & "'" & rsDowload.Fields(2).value & "'" & "," & "'" & rsDowload.Fields(3).value & "'" & ")"
scon.Execute strSQL, , adCmdText + adExecuteNoRecords
rsDowload.MoveNext
Loop
Above code taking so long to complete the loop cause rsdoload (recordset) has more then 30000 records,
Is any body give me better solution where i can improve the perfomance...
What's quickest way to insert the records in table from recordset.......
Any help would really appriciate...
Thanks
AD