Great, I'm glad that worked out for you!
And you know, I didn't just help you ... this also helped me. I hadn't even given it a thought, previously, about making sure the appropriate DLLs were included (by setting the CopyLocal to true). I always figured that my database utility would be run on the server (where it wouldn't matter, because SMO would be there) ... never really gave it much of a thought that it doesn't *have* to be run *on* the server, just somewhere that can *get* to the server (and that "somewhere" may or may not have SMO on it).
I would have realized that the first time someone tried to use this utility from a machine without SMO, but it's nice to realize it now and fix it before we ever sell our still-in-development product.
So, thanks Gunnar! =0)
~~Bonnie
>Well, Bonnie
>
>You definitely have deserved your stars! <vbg>
>
>It works like a charm - can't believe it was so easy.
>
>SMO and its dependencies dlls (see the thread for a list of those) do not need to be installed at all. It looks that the only requirement for this to work is that the dlls are in the same location as the executable using smo.
>
>Thank you so much for your help!
>
>
>
>>
>First advice the user whats out there.
>>Then have the user decide what to do: Instal new here or use existing
>>Then based on the decicion install smo or have the user even go to the existing sql server (physicly) and continue the install there, then i don't need to install smo (i think it installs with sql, correct?)
>>>
>>>Do you think that approach would be acceptable in a shrink-wrapped environment?>>
>>I see no problem with that approach.
>>
>>But, rather than require the user to run the app on the existing server machine, here's another thing you can do rather than install SMO:
>>
>>- Change the "Copy Local" for the SMO references. IOW, in the references of your app, right-click on the Microsoft.SqlServer.Smo and choose Properties. Then change "Copy Local" to true (do this with the other Microsoft.SqlServer.* DLLs). The DLLs get included in your bin\debug folder. So, you're actually going to distribute the DLLs with your app. That's probably ok to do, I'm guessing.
>>
>>... and it seems to work ok, I just tested it. Although, to be honest, I didn't actually test it on a machine that doesn't already have SMO installed, so you may want to play with it a bit more.
>>
>>~~Bonnie