Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 call stored procedure from vbscript DTS activeX
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

19 Posts

Posted - 12/09/2005 :  00:05:29  Show Profile  Reply with Quote
Hi All,

Some reason I am having no luck calling a stored procedure in an ActiveX vbscript code. See code below. Any Ideas why it is not working. I've already checked permissions inside SQL Server.

Function Main() 
    dim conn, strSQL 
    set conn = CreateObject("ADODB.Connection") 
    conn.Mode = "3"  "botbarapp04", "weblogin", "letmein" 
    conn.DefaultDatabase = "Navigator" 

    'Delete Old Data 

    conn.Execute "DELETE tblMasterClassification" 
    conn.Execute "DELETE tblSAPCostGeneralDescription" 

    'Add New Data to tblMasterClassification & tblSAPCostGeneralDescription 
    conn.Execute "INSERT INTO tblMasterClassification (Prod_No, BOT_No, Char_Desc, Char_Value) SELECT F1, F2, F3, F4 FROM tblImportTRSVData"

    conn.Execute "INSERT INTO tblSAPCostGeneralDescription (Prod_No, Gen_Desc, Std_Cost, Last_Recost, Status) SELECT F1, F2, F5, F13, F16 FROM tblImportCostData"

    'Delete Duplicate Data in tblSAPCostGeneralDescription 
    conn.Execute "sp_DeleteCostDuplicates" 
    Set conn = Nothing 
    Main = DTSTaskExecResult_Success 
End Function 

Edited by - andrthad on 12/09/2005 00:07:03

In (Som, Ni, Yak)

17689 Posts

Posted - 12/09/2005 :  00:27:52  Show Profile  Reply with Quote
conn.Execute "exec sp_DeleteCostDuplicates"


Guys, where are we right now ?
Go to Top of Page

Starting Member

19 Posts

Posted - 12/09/2005 :  15:00:23  Show Profile  Reply with Quote
Thanks, but it didn't work. Any other suggestions?
Go to Top of Page

Starting Member

1 Posts

Posted - 06/15/2009 :  18:19:24  Show Profile  Reply with Quote
Originally posted by andrthad

Thanks, but it didn't work. Any other suggestions?

try "EXEC sp_DeleteCostDuplicates"

it should work. It works for me.
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000