Results 1 to 7 of 7
  1. #1
    Join Date
    Feb 2004
    Location
    Los Angeles
    Posts
    14

    Unanswered: Ho to Execute a Scheduled Job from VB6

    Hi ,
    I have an schedueled job which runs a DTS .
    This job is executing everyday at 2:00 Pm and it transfers data from oracle to the SQl server.
    In some cases data in Oracle is not ready at 2:00 , sometimes it is ready at 11:00 AM so what I need is to run that Scheduled job from an exe file .
    I can write a code to run the DTS jobs but the problem in this case is I will lose the History Information I have with my schedueled job.So I need to run The Scheduled job to kep the history .
    I researched the Internet and all I get is how to create a job but I dont have a clue how to run it .
    I'm using Visual basic 6 .
    Thanx .

  2. #2
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Have you looked at...

    sp_add_jobschedule
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  3. #3
    Join Date
    Feb 2004
    Location
    Los Angeles
    Posts
    14
    Thanx for you reply
    sp_add_jobs is creating a new job. I dont wan to creat e a new job because the reason for this application is simply keeping track of this Job's history. Otherwise I could run the DTS itself .

  4. #4
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    OK, lets try again...

    Have you looked at...

    sp_add_jobschedule
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  5. #5
    Join Date
    Feb 2004
    Location
    Los Angeles
    Posts
    14
    I can use sp_update_jobschedule and change the data parameters of job and let it run .
    But can't I really run a Job from visual basic ?

  6. #6
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    OK...look at

    EXECUTE msdb..sp_start_job
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  7. #7
    Join Date
    Feb 2004
    Location
    Los Angeles
    Posts
    14
    PERFECT !
    Thanx .

Posting Permissions

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