DTS & ActiveX script

  • Hi,

    I m working on DTS in which Foxpro Database records need to update to Local Sql 2000 database.  The field/column structure are same for foxpro database & sql database table.  My requirement is to take only those records which are updated within last 7 days in foxpro table ANd delete the same using partycode from sql table AND insert into sql table from foxpro table.  Foxpro Database there r fields like - partycode c(9), dt date

    I m using Activex Script for all this process.  In this the following is the line which tries to capture data from foxpro database.

    ConnLocDbf.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\R\DOR;Extended Properties=dBASE IV;User ID=Admin;Password="

    SQL="select * from VENDOR where between(dt, {01-04-2007}, date()) "

    Encounter error as follows-

    Error Source-Microsoft Jet Database Engine

    Error Description-syntex error(missing operator) in query expression "between(dt, {01-04-2007}, date())"

    The above query is working perfectly in foxpro command box.

    *****

    Posting this for prof. help.  Thanks in adv.

     


    The Best Regards,

    shrikant m dhuri

  • You may have to use the SQL Server version of BETWEEN:

    select * from VENDOR where BETWEEN DATEADD(dd, -7, GETDATE()) AND GETDATE()

    This will give everything in the last 7 days.



    Ade

    A Freudian Slip is when you say one thing and mean your mother.
    For detail-enriched answers, ask detail-enriched questions...[/url]

  • Thanks adrian...

    quick response... tried and success..

     


    The Best Regards,

    shrikant m dhuri

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

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