'backup database
'BackupDataName data inventory absolute path
Function Backupdata (Byval BackupDataname As String) AS String
DIM CONN As New Sqlclient.sqlConnection (MODCONN.GETCONN)
DIM MySelectQuery As String = "Backup Database PopcrM to Disk = '" & BackupDataName & "'"
Dim MyReader As Sqlclient.sqldataReader
DIM CMD AS New Sqlcommand (MySelectQuery, Conn)
If Conn.State = ConnectionsTate.closed the Conn.Open ()
Try
Cmd.executenonquery ()
Backupdata = ""
Catch exSql as sqlexception
IF exSql.number = 3201 THEN
Backupdata = "Please enter the storage path of the backup file correctly!"
Else
Backupdata = exSql.Message
END IF
Catch exception
Backupdata = ex.Message
END TRY
Cmd.connection.close ()
Cmd.dispose ()
Conn.dispose ()
END FUNCTION