the following walkthrough demonstrates the use of a custom action and the customactiondata property to create a database and database table during installation.
on the file menu, point to new, and then choose project. in the new project dialog box, select visual basic projects in the project type pane, and then choose class library in the templates pane. in the name box, type dbcustomaction. click ok to close the dialog box. on the project menu, choose add new item. in the add new item dialog box, choose installer class. in the name box, type dbcustomaction. click ok to close the dialog box. to create a data connection object 【程序编程相关:DataGrid模板列应用——在Data】note this walkthrough requires sql server on the computer where you will deploy the application.to create an installer class 【推荐阅读:在数据库中开始一个事务。 】in server explorer, select data connections. right-click and choose add connection. in the data link properties dialog box, do the following: enter the server name. select use windows nt integrated security. in the database box, type master. click ok to close the dialog box. drag the new connection and drop it on the dbcustomaction.vb designer to create a sqlconnection1 object. to create a text file that contains a sql statement to create a database ... 下一页