how to install database along with VB software
i would like to know how i will intregate the database object like store
procedure and triger and table along with my VB software installation
Re: how to install database along with VB software
You can do this a couple of ways.
First, if your db is SQL Server, you can distribute the mdf file and attach
it at the installation site by running a stored procedure sp_attach_db.
Reference the books online for the syntax. You must connect as a member
of the sysadmin role (the SA account is SOP). You can do this w/ a command
in ADO or a querydef in ODBC Direct.
Otherwise, you can grab your scripts from the SQL Server enterprise manager
(or other db management tool) and run them in ADO as any other DDL statement.
In SQL Server the enterprise manager has a wizard to generate the SQL scripts
that you can copy and paste into your application code. Remember that some
databases respond differently to your DDL statements if the currently object
One thing you can do to automate this is to add a table to the database to
track versions of the database itself. Have your application check this
version on startup and run scripts as necessary.
Best of luck.
"rajneesh" <email@example.com> wrote:
>i would like to know how i will intregate the database object like store
>procedure and triger and table along with my VB software installation
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL