• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 264
  • Last Modified:

Comment for Preece

Comment from Preece
Date: 05/02/2005 10:12AM PDT
 Comment  


; - )
 
Comment from Mswetsky
Date: 05/02/2005 10:27AM PDT
 Your Comment  


Thanks for your comments. I think I see your points and am begining to understand, But I am new to ASP programming and am not sure what the resolution would be.
Do I need to move the Addnew statements after the first End If
 
Accepted Answer from TheLearnedOne
Date: 05/02/2005 10:33AM PDT
Grade: B
 Accepted Answer  


I could imagine something like this:

' OPEN an OLE DB CONNECTION
     Set conn = Server.CreateObject("ADODB.Connection")      
     cst = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\Data\MIS\CSPM\CSPM.mdb"
     conn.open cst
     
' Define Record Set
     Set rsDetail = Server.CreateObject("ADODB.Recordset")                                              
' Define Second Record Set
     Set rsDetail2 = Server.CreateObject("ADODB.Recordset")                                                                                
FOR Each LogID in Request.FORM()
         
     IF Request.Form(LogID) <> "Enter" THEN
       ' IF there is data in Text box, then write to the record          
     
     strSQL = "SELECT * from TH6040 WHERE Log_ID = " & LogID & " AND LOG_ST_CD='48';"
          rsDetail.Open strSQL, conn,3, 3    

          strSQL2 = "SELECT * FROM Tbl_FollowUps ;"
          rsDetail2.Open strSQL2, conn,2,3    
                                       

          IF Request.Form(LogID) <> "" THEN
               rsDetail("Assigned_RSE")= Request.Form(LogID)                    rsDetail("Log_ID")= LogID                                                  
               rsDetail.Update
               
     ' Now I want to take the fields from RSdetails(th6040) and update the Tbl_FollowUps table
               rsDetail2.Addnew
               rsDetail2("Assigned_RSE")= Request.Form(LogID)                                                    
               rsDetail2("RESP_Name")= rsDetail("RESP_Name")              
               rsDetail2("Employee")= rsDetail("Employee")
               rsDetail2("ICSSLog")= rsDetail("Log_ID")
               rsDetail2("Assigned_Date")= rsDetail("LAST_UPDT_")
               rsDetail2("Prob_Class")= rsDetail("Prob_Class")              
               rsDetail2("Problem_Ty")= rsDetail("Problem_Ty")    
               rsDetail2("Prod_Ser_No")= rsDetail("Prod_Ser_No")
               'Response.write rsDetail("LAST_UPDT_")
               'Response.end

              rsDetail2.Update

          END IF
         
     END IF
Next

     rsDetail.Close
     rsDetail2.Close

     SET rsDetail = Nothing
     SET rsDetail2 = Nothing

%>


Bob

 
Comment from Mswetsky
Date: 05/02/2005 10:50AM PDT
 Your Comment  


I see your point,
Thanks Bob
 
Comment from Preece
Date: 05/02/2005 10:55AM PDT
 Comment  


Hmmmm....should the points be split on this one?
0
Mswetsky
Asked:
Mswetsky
1 Solution
 
PreeceCommented:
Thanks!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now