Welcome to dbForumz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

help with script

 
   Database Forums (Home) -> DTS RSS
Next:  How to Create a Backup Site ?  
Author Message
jojo123

External


Since: Jul 04, 2008
Posts: 15



(Msg. 1) Posted: Thu Aug 21, 2008 7:23 am
Post subject: help with script
Archived from groups: microsoft>public>sqlserver>dts (more info?)

Hi

I have the code below in a dts package to read any file from a particular
directory - I get error with My.Computer.FileSystem.... - How can I sort this
out.

Thanks


Function Main()
Dim file As String
file = My.Computer.FileSystem.GetFiles "\\Directory\Inbox\EAF1NL*.xml"
Set objBulkLoad = CreateObject("SQLXMLBulkLoad.SQLXMLBulkload")
objBulkLoad.ConnectionString = "provider=SQLOLEDB;data
source=localhost;initial catalog=myDB; integrated security=SSPI"
objBulkLoad.ErrorLogFile = "\\Directory\Inbox\EAF1errorfile.txt"
objBulkLoad.Execute "\\Directory\Inbox\EAF1NL.xsd", "file"
My.Computer.FileSystem.MoveFile "file","\\Directory\Inbox\Archive\"
Set objBulkLoad = Nothing
Main = DTSTaskExecResult_Success

End Function

 >> Stay informed about: help with script 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
script for ftp - I made a batch file which runs an ftp script. I'd like to put this either into a sp. Not sure how to go about this. Here's the batch file: ftp -i -s:c:\laufer.txt laufer.com > c:\laufer.log It uses this laufer.txt The laufer.txt is: <User N...

Generate SQL Script? - Hi, I have many DTS packages created on a Server. I am now planning to shift the SQL Server Database on a new higher capacity server.I want all the packages those are there on the current server to be available on the new server. How can I achieve this?...

How to execute a DTS script - I have a completed DTS package in my SQL server. The examples talk about creating and executing a DTS from VB, but no connection information is ever provided. I just want to execute the already existing package, not create another. I would REALLY like...

ActiveX Script Reusable - Somebody use ActiveX Script Reusable. Please tell me how do it. Thanks everyone.

Script Task executed twice! - I have written script inside main() of a script task. The code is written inside the Package's OnPreExecute event. How come the script is executed twice. Since it is defined inside the package, it should execute only once; right?
   Database Forums (Home) -> DTS All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]