none
Try to using smo in .NET

    Question

  • hi

    i am trying to take backup of my sql server data base from the .net window application

    for this i already added flowing references

    Microsoft.SqlServer.Smo

    Microsoft.SqlServer.ConnectionInfo

    and following namespace

    • Microsoft.SqlServer.Management.Smo;
    • Microsoft.SqlServer.Management.Common;

    But still when i am trying to create object of backup class

     Backup sqlBackup = new Backup();

    type or namespace name 'Backup' could not be found (are you missing a using directive or an assembly reference?)

    Suggest me what i have to do ..

    Thanks

    Monday, April 16, 2012 8:34 AM

Answers

  • hi i able to solve ...

    i need to add one more reference

    Microsoft.SqlServer.SmoExtended reference.

    thnx

    • Marked as answer by Stephanie Lv Tuesday, April 17, 2012 2:59 AM
    Monday, April 16, 2012 9:33 AM

All replies

  • (are you missing a using directive or an assembly reference?)

    Hello,

    And, have you added the using directive in you code?

    using Microsoft.SqlServer.Management.Smo;


    Olaf Helper
    * cogito ergo sum * errare humanum est * quote erat demonstrandum *
    Wenn ich denke, ist das ein Fehler und das beweise ich täglich
    Blog Xing

    Monday, April 16, 2012 8:45 AM
  • i already added..

    Reference and namespace both in my code..

    Monday, April 16, 2012 9:30 AM
  • hi i able to solve ...

    i need to add one more reference

    Microsoft.SqlServer.SmoExtended reference.

    thnx

    • Marked as answer by Stephanie Lv Tuesday, April 17, 2012 2:59 AM
    Monday, April 16, 2012 9:33 AM
  • Microsoft.SqlServer.SmoExtended reference.

    Yes, since SMO 2008(R2) this is also necessary.

    Olaf Helper
    * cogito ergo sum * errare humanum est * quote erat demonstrandum *
    Wenn ich denke, ist das ein Fehler und das beweise ich täglich
    Blog Xing

    Monday, April 16, 2012 2:53 PM