Advertisement

04.24.2007 at 10:31AM PDT, ID: 22531124
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.0

CurrentDB.openrecordset with ADO

Asked by kfschaefer1 in Access Coding/Macros, Microsoft Access Database, Oracle 9.x

Tags:

I currently have code that opens and updates Oracle tables.  Need to modify to update a single field for Comments into the Oracle table.  I am use to DAO What is the proper syntax to set the recordset to a sql string. See '<<<<<<<<<<<<<<<

Due to grouping issue and Jet engine errors I need to update this field after running the first set of sql.

    Dim sConn As String
    Dim oConn As ADODB.Connection
    Dim lCnt As Long
    Dim sSql, strSQL As String
    Dim rstOra As ADODB.Recordset
    Dim rsAccess As New ADODB.Recordset, rs As New ADODB.Recordset
    Dim fld As ADODB.Field
   
    On Error GoTo ErrorHandler
       
  DoCmd.SetWarnings False
     sConn = _
         "Driver={Microsoft ODBC for Oracle};Server=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)" _........

   strSQL = "SELECT " & _
                 "  MEASNO, FTEMNOMENCLATURE, NOMENCLATUREMODEL, " & _
                 "  EquipID As EQUIPMENT_ID, MULTIPLE_ID, JOB_GROUP, " & _
                 "  PROJECT, PRIORITY, COMPLETEBYDATE AS COMPLETE_BY_DATE, " & _
                 "  RequestorId As REQUESTOR_ID, " & _
                 "  CALIBRATION, REPAIR, MODIFICATION, ACCEPTANCE, EVALUATION, " & _
                 "  MAINTENANCE, SUPPORT, CMIS_LAB, SERVICE_LAB, WORK_CODE, " & _
                 "  CHARGE_NUMBER, DISPOSITION, INPUT_RANGE_MIN, " & _
                 "  INPUT_RANGE_MAX, INPUT_UNITS, OUTPUT_RANGE_MIN, OUTPUT_RANGE_MAX, " & _
                 "  OUTPUT_UNITS, GAIN, CUTOFF_FREQ, INPUT_FREQ, REF_FREQ, REF_VOLTAGE, " & _
                 "  EXCIT_VOLTAGE, EXCIT_ENABLED, FTIR_ACCURACY, OFFSET, OFFSET_ENABLED, " & _
                 "  REQ_EMO1, REQ_EMO2, REQ_EMO3, REQ_EMO4, REQ_EMO5, REQ_EMO6, " & _
                 "  SPARECODE, CALIBRATION_ID " & _
                 "FROM QS_SRUpdatetoCMISdrt " & _
                 "WHERE job_group ='" & spar & "'"
    Set rsAccess.ActiveConnection = CurrentProject.Connection
    rsAccess.CursorType = adOpenStatic
    rsAccess.Open strSQL
   
    If rsAccess.EOF = False Then
   
        Set oConn = New ADODB.Connection
        oConn.Open sConn
       
        Set rstOra = New ADODB.Recordset
       
        rstOra.ActiveConnection = oConn
        rstOra.CursorType = adOpenKeyset
        rstOra.LockType = adLockOptimistic
        rstOra.CursorLocation = adUseServer 'default
        rstOra.Open "CMIS.UDV_RFS_SR"
       
        Do While rsAccess.EOF = False
            rstOra.AddNew
            On Error Resume Next
                For Each fld In rsAccess.Fields
                    rstOra(fld.Name).Value = fld.Value
                Next
            rstOra.Update
        rsAccess.MoveNext
        Loop
     
     End If
        strSQL = "Select REQUESTORCOMMENTS from Ta_SR WHERE  job_group = '" & spar & "'"
        Debug.Print strSQL
        Set rs = CurrentDb.OpenRecordset(strSQL)'<<<<<<<<<<<<<<<<<<<<<

        strSQL = "UPDATE CMIS.UDV_RFS_SR SET REQUESTORCOMMENTS = rs!REQUESTORCOMMENTS.value WHERE  job_group = '" & spar & "'"
        oConn.Execute strSQL, lCntStart Free Trial
[+][-]04.24.2007 at 10:36AM PDT, ID: 18967648

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.24.2007 at 10:36AM PDT, ID: 18967647

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.24.2007 at 10:38AM PDT, ID: 18967659

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.24.2007 at 10:42AM PDT, ID: 18967700

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.24.2007 at 10:52AM PDT, ID: 18967792

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.24.2007 at 11:10AM PDT, ID: 18967952

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Access Coding/Macros, Microsoft Access Database, Oracle 9.x
Tags: ado
Sign Up Now!
Solution Provided By: jimhorn
Participating Experts: 2
Solution Grade: A
 
 
[+][-]04.24.2007 at 11:45AM PDT, ID: 18968315

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32