Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB Databases
|
Pro VB Databases Advanced-level VB coding questions specific to using VB with databases. Beginning-level questions or issues not specific to database use will be redirected to other forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 19th, 2004, 01:56 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 128
Thanks: 0
Thanked 0 Times in 0 Posts
Default Installing MSDE w/ Visual Studio Installer

I am working on a application that uses Microsoft SQL Server 2k. I want to be able to offer a demo application that will run on the desktop using MSDE. I have been trying top find some documentation on how to install MSDE and the databases. I have found some information which seems to be scattered about. I am wondering if any of you could provide me with some contiguous information or point me in the right direction.

I would like to have one installer file (.msi) using Visual Studio installer.

Thanks in advance for your help.



Larry Asher
__________________
Larry Asher
 
Old April 19th, 2004, 09:16 PM
sal sal is offline
Friend of Wrox
 
Join Date: Oct 2003
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It it comes down to it you may be able to run some ADO command object with the script that either creates a database or loads a database from a backup file. Look up the code to run in Books on Line.

In theory it should work.



Sal
 
Old April 19th, 2004, 10:08 PM
Registered User
 
Join Date: Jul 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I do a very similar thing in an app I have written. I just have my code execute batch files. Here's a sample:

@echo off
C:
cd database
osql -S %1 -d master -U %2 -P %3 -I < script1.sql > script1.log
osql -S %1 -d master -U %2 -P %3 -I < script2.sql > script2.log
osql -S %1 -d master -U %2 -P %3 -I < script3.sql > script3.log
osql -S %1 -d master -U %2 -P %3 -I < script4.sql > script4.log
@cls

The .sql files are just the SQL commands to create the tables and set up the relationships. This way is good, because it is pretty much version/platform independent, ie you can use the .sql files for SQL Server or Oracle or MySQL etc. Another alternative (again using batch files) is to restore a backup of the database in raw form. This is much faster, but doesn't survive upgrades etc. as well.

As far as installing the MSDE, there are .MSM's (merge modules) that you can just incorporate into your installer, and it will install everything in one shot, with your one big .MSI file. The only problem with this is that the MSDE and your app are now tied together. There may be instances where it is nicer to just install the MSDE separately.

Mike
 
Old April 20th, 2004, 08:16 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 128
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I really appreciate the feedback from you both. I am going to take a look at this over the next few days.

Thanks again,



Larry Asher





Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing IIS for Visual Studio 2003 createrk General .NET 3 April 25th, 2008 12:03 PM
Installing msxml in visual studio 2005 nilay.rathod Visual C++ 2005 0 February 15th, 2008 02:18 AM
installing sql server 2005 with visual studio lucycastaldo SQL Server 2005 2 April 23rd, 2007 06:46 PM
Visual Studio 2003 vs. Visual Studio 2005 eitanbarazani C# 2005 4 May 9th, 2006 01:34 AM
MSDE Installer rodmcleay VB Databases Basics 0 January 28th, 2004 03:02 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.