现在用vs做了一个winfrom程序,用的是mysql的数据库!   我在生成的时候应该如何做,才能保证:
1.使用的电脑不用安装mysql客户端
2.程序打包后里面有一个文件夹是放mysql的数据库文件的;
  现在就是说使用端不用安装mysql服务器,也能正常使用程序,正常访问到他自己机器上的mysql数据库文件

解决方案 »

  1.   

    不装mysql服务没法访问数据库文件
      

  2.   

    那你需要研究的东西比较多了,你需要研究INNODB或者MYISAM的数据存储结构,这样你可以不需要通过MYSQL直接去访问它的数据文件。当然前提是你需要了解数据是如何存放的。 INNODB或者MYISAM的源代码你可以研究。
      

  3.   


    1:你用免安装的MYSQL数据库,打包的时候把它一起打包进去,安装的时候注册MYSQL服务就可以了,可以用BAT文件实现。2:本机有MYSQL文件,启动服务后,就可以直接用本机的MYSQL数据库了。
      

  4.   

    libmysqld, the Embedded MySQL Server Library
    The embedded MySQL server library makes it possible to run a full-featured MySQL server inside a client application. The main benefits are increased speed and more simple management for embedded applications. The embedded server library is based on the client/server version of MySQL, which is written in C/C++. Consequently, the embedded server also is written in C/C++. There is no embedded server available in other languages. The API is identical for the embedded MySQL version and the client/server version. To change an old threaded application to use the embedded library, you normally only have to add calls to the following functions.