Recordset Q

Results 1 to 2 of 2

Thread: Recordset Q

  1. #1
    DKL Guest

    Default Recordset Q

    Hi,<BR><BR>I am executing several queries in a single asp page. I was wondering whether we need to create Recordset object for each query. At present my code looks like this:<BR><BR>&#060;%<BR>Dim conn <BR>Dim RS<BR><BR>conn = session("Connection")<BR><BR>set RS = Server.Createobject("ADODB.Recordset")<BR>SQL = "EXEC sp1 " & number <BR>RS.Open SQL, conn<BR>RS.close<BR><BR>set RS = Server.Createobject("ADODB.Recordset")<BR>SQL = "EXEC sp2 " & date1 <BR>RS.Open SQL, conn<BR>RS.close<BR><BR>set RS = nothing<BR>%&#062;<BR><BR>Thanks

  2. #2
    Al Bear Guest

    Default RE: Recordset Q

    Right there are two way of doing this open how youi have but the second record set will over right the fist. so you need to call them diffrent names. <BR><BR>if there are insert stamnet delete stament or update you can just run the SQL like this. but wont have the values stored in you asp page to play around with. <BR><BR>SQL = "EXEC sp2 " & date1 <BR>objCon.Execute(SQL)<BR><BR>where objcon. is your database connection object. hope this helps if you have any more questions please ask.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts