Results 1 to 2 of 2

Thread: Creating a sql database dump from VB6

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 1999
    Posts
    6

    Post

    Hi,

    I am trying to create a dump of a sql database from VB6. From isqlw it goes like this:

    dump database master to disk = "c:\mssql7\backup\test.dmp"

    I am runnig MSSQL7 and VB6. Any idea on how to do this?

    Thanks,

    Yared

  2. #2

    Thread Starter
    New Member
    Join Date
    Oct 1999
    Posts
    6

    Post

    OK guys, I figured out how to do it myself. Here is the code:

    *********
    Private Sub Form_Load()
    Dim name As String
    Dim src As String
    Dim dst As String
    Dim dsn As String

    src = "c:\mssql7\backup\master.dmp"
    dsn = "Provider=SQLOLEDB.1;Password='';User ID=sa;Data Source=SQL_SERVER_NAME"

    DE.Connection1.Open (dsn)
    DE.Connection1.Execute "dump database master to disk = '" + src + "'"
    DE.Connection1.Close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width