请交用vc等程序语言,不使用企业管理器怎么启动和加载某个数据库,启动和关闭数据库服务

解决方案 »

  1.   

    SQLDEMO??查查看。我也不太清楚
      

  2.   

    启动和关闭数据库服务:
    http://www.7880.com/Info/Article-11af4860.html加载某个数据库?
    附加数据库:
    sp_attach_single_file_db '数据库名','mdf文件路径'
    建库:
    CREATE DATABASE Products
    ON 
    ( NAME = prods_dat,
       FILENAME = 'c:\program files\microsoft sql server\mssql\data\prods.mdf',
       SIZE = 4,
       MAXSIZE = 10,
       FILEGROWTH = 1 )
    GO
      

  3.   

    找一个SQLDMO.h和SQLDMO.dll
    SQL-DMO is implemented in Sqldmo.dll. These SQL-DMO objects expose the properties, methods, and events that automate administrative tasks for SQL Server. They cannot be used to connect to and operate against a SQL Server version 6.5 (or earlier) server. Therefore, it is recommended that you rewrite SQL-DMO applications. 
    If the application must operate against both SQL Server 2000 and version 6.5 or earlier of SQL Server, reference both Sqldmo.dll and Sqlole.dll components in the application. Develop new, separate subroutines referencing the SQL Server 2000 SQL-DMO objects from the existing subroutines.If the application will work against SQL Server 2000 only, rewrite existing subroutines to reference SQL Server 2000 SQL-DMO objects.If the application will not be used against your new SQL Server 2000 server(s), continue to use the application unchanged.
      

  4.   

    我用 scm -Action 6 -Service mssqlserver对msde 没问题,但对 2000 个人版本,总提示错误?  why?