DDQ Update only issue

  • Thanks in advance for any advice.

    I'm attempting to use a DDQ for updating only.

    I don't have to check to see if the record exist, that is a given.

    I'm taking data from a SQL 2000 database and updating an ACCESS 03 database.

    The DDQ runs fine with no errrors - but it does not update the record in the database.

    Below is my code.

    my update query:

    UPDATE tblPeople

    SET Address1 = Address1,

    Address2 = Address2,

    Address3 = Address3,

    City =City,

    State =State,

    PostalCode =PostalCode,

    Country =Country

    WHERE ABR_ID = ABR_ID

    MY ACTIVEX SCRIPT

    '**********************************************************************

    ' Visual Basic Transformation Script

    '************************************************************************

    ' Copy each source column to the destination column

    Function Main()

    DTSDestination("Country") = DTSSource("country")

    DTSDestination("PostalCode") = DTSSource("postalcode")

    DTSDestination("State") = DTSSource("State")

    DTSDestination("City") = DTSSource("city")

    DTSDestination("Address3") = DTSSource("address3")

    DTSDestination("Address2") = DTSSource("address2")

    DTSDestination("Address1") = DTSSource("address1")

    Main = DTSTransformstat_UpdateQuery

    End Function

    MY SOURCE QUERY:

    Select *

    from tempaddress2

    Any suggestions will be appreciated.

  • --in DDQ, ? = source parameters in the same order as in transformation tab.

    UPDATE tblPeople

    SET Address1 = ?,

    Address2 = ?,

    Address3 = ?,

    City =?,

    State =?,

    PostalCode =?,

    Country = ?

    WHERE ABR_ID = ?

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply