Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

New MSDE Object


6 replies to this topic

jeffm

jeffm
  • Members
  • 37 posts

Posted 30 May 2001 - 20:41

I have just installed and taken a look at 6.3. I like the idea of the msde object. I have not used objects before so I dont know where to insert code.

I see the examples they give for setting values for the iss file. I am assuming that we use normal dialog to get the values and then pass to the object using the sample scripts?

At what point does it actually start installing. I checked the 'oninstalled' event. When is that and can I set it to install when I want?

Has anyone started coding for it and used it? I would appreciate any help.

Thanks!


kevinp

kevinp
  • Members
  • 3 posts

Posted 13 June 2001 - 22:08

I tried this object today and found it fairly simple to use.  You don't actually have to do much in your code at all.  I created a new component for it.  Then inserted this object under that component.  When inserting the component, it takes you through a wizard to answer most of the questions.  So unless you need to do something special, there is no new code.

I have previously been launching the MSDE install myself.  In doing that I found that the MSDE install doesn't check for things like SQL Server 7 or 2000 and in fact, will end up causing problems for both.  So I had to check for that.  It's not clear whether I still need to do so.

The thing I can't figure out with the MSDE object is how to attach a database.  I've got a program that we've written that will do this, but I was hoping the object would have that functionality built into it.  Any insight anyone has on that would be appreciated.


Robert Graham

Robert Graham
  • Members
  • 70 posts

Posted 14 June 2001 - 01:01

Hi!

MSDE *is* SQL Server 7.  They just chopped off all the front end tools like Enterprise Manager, and crippled the MSDE so it will not perform well with heavy traffic.  (Assuming you view SQL Server 7 as performing "well" with heavy traffic.  lol!!!!!)

But for intents and purposes of building databases, MSDE is no different from SQL Server - it has to do all the same things with the system tables.  So there is no simple way to "attach" a database.

I use batch files written in osql to build the DB, batch files with bcp to load data into the tables once the db is built.  Two externally launched master batch files, and I have a SQL Server (MSDE) db.  Same batch files work for either - we use both.

That is probably as simple as it will ever be.

You could also use SQLDMO - probably from InstallScript, definitely from a VB app.  But I think that would be a lot more trouble than running the batch files.  I did a roll-your-own "Enterprise Manager" in VB/SQLDMO to deploy with our MSDE apps, since it does not provide any admin tools.  I don't think it would be very efficient for creating dbs though - you have to navigate through a DAO-like hierarchy of objects.


kevinp

kevinp
  • Members
  • 3 posts

Posted 14 June 2001 - 15:37

Thanks for the quick response.  We also have a VB based app to attach the .mdf's we distribute.  I was just hoping to get rid of this as it seems every install that uses the MSDE object will want to either attach a database or create one.

We redistribute MSDE for our product as a means of evalution.  Users would eventually migrate this to SQL Server or Oracle for production.  We provide the scripts for these databases (so of course the SQL Server script could be used for MSDE).


jeffm

jeffm
  • Members
  • 37 posts

Posted 19 June 2001 - 15:11

Thanks for the info. I am just getting around to checking after time on another project.

I used to 'restore' database with a command line. Boy, that could take 30 minutes or so depending on the clients machine.

Now I use sp_attach_db and osql to execute it.  Attaches any database in about 5 secs!

I decided to stay with my msde install routine. Looking at the code for the object, it is almost identical except mine is script instead of an object.

Thanks!


kevinp

kevinp
  • Members
  • 3 posts

Posted 19 June 2001 - 15:32

I might be heading back to my own stuff as well.  The only thing I'm getting that I don't already have is German support.  I'm also running into problems installing on machines with SQL Server client or server already installed.  I already had code to figure this out and reuse those installations.

Thanks for the tip on attaching.  Might help me speed things up.