About data operation (backup)

xiaoxiao2021-03-06  25

Need to join the COM components of SQL to use, and learn a big move.

Private void back () {try {if (! Directory.exists (Server.MAppath ("))) {Directory.createdIRectory (Server.MAppath (" ../ backdate / "));} PBACKUP .Initialize = true; sqldmo.sqlserver sqlser = new sqldmo.sqlserVERCLASS (); SQLSER.CONNECT ("127.0.0.1", "sa", ""); pBackup.Database = "pubs"; string filename = "back" DateTime.now.year "_" system.datetime.now.month "_" DateTime.now.day ". RBK"; PBackup.Files = Server.mappath ("../ backdate /") filename; PBACKUP . Sqlbackup (SQLSER); sqlser.disconnect (); response.write ("