Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Wodzu
Yak Posting Veteran
58 Posts |
Posted - 2007-10-03 : 10:58:19
|
Hello folks.My problem is quite complex (for me) so I'll start from the beginning.I am creating an installer for my database application. The installer task is also to create new database and it's tables. The client server version will be unknown. I only know that it will be SQL 2000 or SQL 2005.SO I've started googling for the possibilities which I have to create such installer. OK someone told me that there is something like DMO Objects so I've started working with them.Firstly I've obtained the server list using SQLDMO.Application Object and its ListAvailableSQLServers() method. It worked, great!It displayed me all servers in my network. So I've picked up one SQL 2000 server name and tried to connect to it via SQLDMO.SQLServer.Connect method. It worked again.But.. on my dev machine I have installed not only SQL 2000 server but also SQL 2005 server. So I've picked up its name, tried to log in as before and got message that I need SMO objects to log in.And that is the point where I am lost. Firstly I would like to know can I have both SMO and DMO on my machine? I've tried to create SMO objects but it looks like they were not registered.The second thing is, how can I intercept only the Exception saying that i need SMO Objects instead of DMO. I would like to catch that exception and try to create SMO Objects instead. Of course it doesn't make any sense if I can't have both DMO and SMO.If I can't have both SMO and DMO can I have some SMO version with downward compatibility? Where to download it? How to install it and overwrite DMO? But I really would like to have both and test it.Thanks for your time and any advices! |
|
Wodzu
Yak Posting Veteran
58 Posts |
Posted - 2007-10-04 : 09:14:28
|
Ok, I've found update for DMO on Microsoft's website and everything works great. |
 |
|
jezemine
Master Smack Fu Yak Hacker
2886 Posts |
Posted - 2007-10-04 : 09:42:46
|
be aware that DMO is deprecated, however. it won't exist in SQL Server 2008. SMO is its replacement.SMO is installed with all SQL 2005 skus, or you can download it separately (free). elsasoft.org |
 |
|
|
|
|