Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Imports System.Web.Services
Imports System.Data
Imports System.Data.SqlClient
Imports System.Runtime.InteropServices
Imports DTS
<System.Web.Services.WebService(Namespace:="[URL unfurl="true"]http://tempuri.org/ReportingWebService/RWS")>[/URL] _
Public Class RWS
Inherits System.Web.Services.WebService
<WebMethod()> Public Function ForceDTSsynch(ByVal TestMe As String)
'//Created: 05/03/2004 by C. Michael Wells
'//Purpose: force DTS package synchronization
'//Arguments: NONE
'//REFERENCES: Microsoft DTSPackage Object Library (COM)
'// located at: C:\Program Files\Microsoft SQL Server\80\Tools\Binn\dtspkg.dll
'//Returns: integer value, translated as follows:
'// 1: Job Completed Successfully
'// 2: COM error
'// 3: Other error
'//declare variables:
Dim pkg As New DTS.Package
Try
pkg.LoadFromSQLServer("servername", "userid", "password", _
DTSSQLServerStorageFlags.DTSSQLStgFlag_Default, _
Nothing, Nothing, Nothing, "myPackage", Nothing)
pkg.Execute()
pkg.UnInitialize()
pkg = Nothing
Return 1 '//success
Catch exc As System.Runtime.InteropServices.COMException
Return exc.ToString '//COM error
Catch exc As Exception
Return 3 '//unspecified error
End Try
End Function
End Class
<?xml version="1.0" encoding="utf-8" ?>
<anyType xmlns:q1="[URL unfurl="true"]http://www.w3.org/2001/XMLSchema"[/URL] d1p1:type="q1:string" xmlns:d1p1="[URL unfurl="true"]http://www.w3.org/2001/XMLSchema-instance"[/URL] xmlns="[URL unfurl="true"]http://tempuri.org/ReportingWebService/RWS">System.Runtime.InteropServices.COMException[/URL] (0x80040428): Package failed because Step 'Copy SQL Server Objects' failed. at DTS.PackageClass.Execute() at ReportingWebService.RWS.ForceDTSsynch(String TestMe) in C:\Inetpub\[URL unfurl="true"]wwwroot\ReportingWebService\RWS.asmx.vb:line[/URL] 118</anyType>