Results 1 to 5 of 5

Thread: getting data - sometimes redundant - good way of dealing with it?

Threaded View

  1. #1

    Thread Starter
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Do you even need to save the personal data everytime? Is it going to change all the time? And if it changes then it should be updating the previous entry not adding a new one right?

    You could do something like this:
    VB Code:
    1. Public Sub UpdatePersonalData(PersonalID as integer)
    2.    'run a query to see if the personalID exists
    3.     rs.open "SELECT * FROM PersonalData WHERE PersonalID=" & PersonalID,cnn,blahblahblah
    4.    If rs.Recordcount<0 then
    5.        'not already there add
    6.        rs.addnew
    7.    End if
    8.        'already there just update
    9.        rs.MoveFirst
    10.        rs!PersonalData=pData
    11.        rs.Update
    12. End Sub
    Last edited by Edneeis; Jul 17th, 2001 at 10:53 AM.

Posting Permissions

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



Click Here to Expand Forum to Full Width