[AccessD] Why is recordset not updating?

Charlotte Foust cfoust at infostatsystems.com
Mon Jul 25 17:22:35 CDT 2005


I think you'll have to post the missing bits of this code before anyone
can say for sure what's happening. Without knowing whether Option
Explicit is on and what your variables are declared as and what myds and
myds2 and myds1 actually represent, we're just guessing.  

Charlotte Foust


-----Original Message-----
From: Kaup, Chester [mailto:Chester_Kaup at kindermorgan.com] 
Sent: Monday, July 25, 2005 2:47 PM
To: Access Developers discussion and problem solving
Subject: [AccessD] Why is recordset not updating?


The table is not getting populated using the following code. I think
addnew and update are messed up somewhere.

 

myds.AddNew

        myds.Fields(0) = myds2.Fields(0)

        myds.Fields(1) = ProdDate

        myds.Fields(2) = myds2.Fields(2)

        If RecordCounter = 1 Then

            myds.AddNew

            myds.Fields(3) = myds2.Fields(2) / 365.25

         Else

            Do Until PriorCumTotInj < myds1.Fields(2)

                FluidType = myds1.Fields(5)

                myds1.MoveNext

            Loop

            myds1.MovePrevious

            If FluidType = "CO2" Then

                myds.Fields(3) = myds1.Fields(2) + PriorCumTotInj

            Else

                myds.Fields(3) = myds1.Fields(3) + PriorCumTotInj

            End If

        End If

        ProdDate = ProdDate + 1

        myds.Update

 

Chester Kaup

Engineering Technician

Kinder Morgan CO2 Company, LLP

Office (432) 688-3797

 

No trees were killed in the sending of this message. However a large
number of electrons were terribly inconvenienced.

FAX (432) 688-3799

 

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list