Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: oSQL or SQL-DMO: Which is the best solution?


Message #1 by "Solutions 2000" <provb@s...> on Mon, 20 Aug 2001 11:11:57 +0300
I use the Windows Installer! I used to manually add the sqldmo
dll's and rll's in the setup and set their installation paths.
But your way sounds much cleaner.
How do I package msde with my setup so that I don't mess
up client machines configurations when the application get's
installed?
In other words, how do you package yours?


john
-----Original Message-----
From: bounce-pro_vb-478924@p...
[mailto:bounce-pro_vb-478924@p...]On Behalf Of Tim Mccurdy
Sent: Monday, August 20, 2001 5:11 PM
To: professional vb
Subject: [pro_vb] RE: oSQL or SQL-DMO: Which is the best solution?


It all depends on where and what type of machine you are installing on.  For
example, if I am installing on a single machine or a laptop, I will package
the MSDE (freely distributable) and include the MDF and LDF files for the
Database with scaled-down data in it.

After the program installs, I will run a Synchronize that will determine if
the Local Database exists yet.  If not, SQLDMO will attach it and then
verify the Database structure with the Master.

-----Original Message-----
From: Solutions 2000 [mailto:provb@s...]
Sent: Monday, August 20, 2001 9:14 AM
To: professional vb
Subject: [pro_vb] RE: oSQL or SQL-DMO: Which is the best solution?


What about installations? How do you package your programs so that
the files needed are installed properly? Have you tried installing your
programs
in a machine that has Enterprise manager? Disastrous! I had to totally
reinstall
sqlserver. I'm yet to sort out how to package it Safely. That's why I'm
looking
for other solutions.
Thanks for your input!


-----Original Message-----
From: bounce-pro_vb-478924@p...
[mailto:bounce-pro_vb-478924@p...]On Behalf Of Tim Mccurdy
Sent: Monday, August 20, 2001 3:42 PM
To: professional vb
Subject: [pro_vb] RE: oSQL or SQL-DMO: Which is the best solution?


Answer:  SQLDMO all the way!!!

You will not find better control over SQLServer than that!  Use it, abuse
it!  Heh.

I develop a lot of Synchronize programs, and I have had huge success with
all kinds of validation and Error Handling in my programs.  There are sample
Programs in the MSSQL Directory for you to try to see how to use SQLDMO.

-----Original Message-----
From: Solutions 2000 [mailto:provb@s...]
Sent: Monday, August 20, 2001 4:12 AM
To: professional vb
Subject: [pro_vb] oSQL or SQL-DMO: Which is the best solution?


Hi
I'm in the middle of a problem that has nagged me for a few days now and I
don't know which route to follow.
Let me explain.
My application uses stores it's data in sql server 7.0, and I'd like
it, -the app-, when run for the first time, to create a database in SQL and
run the SQL script (.sql) included with the app's setup. I had initially
written a vbs file that does all that then launches osql and runs the script
then I decided to write a small dll in vb to do all that. What I'd like to
know is which is the best route to take in my dll.
1. Using osql I create a temp .sql file and launch osql and run the script.
Problem with this is that I can't catch errors if they occur during the
running of the script plus I've no control of whats going on in the dos
window that loads. AND sql client utilities must be installed in the
machine.
2. Use SQL-DMO to run the script and have the God advantage of being able to
catch errors if they occur and report them. Problem with this, is that
packaging SQL DMO is not very easy especially if enterprise manager is
installed. I can carry SQL DMO with my package and install it if enterprise
manager is already present, or, leave it out and require that SQL client
utilities be installed in the system (as I would also have done in 1.
above).

These are my current options.
Has anyone out here ever had the need to create a database in SQL Server
using Visual basic and run a script to modify the structure of the your
database? and if you have, how did you do it?
I"m really stuck here, I'd really appreciate any input on this!

Thanks in advance

John




  Return to Index