Hi,
I'm developing installation package for app, it needs to check weather a sql server database exists on local machine and/or local network, what is the full name of the server (weather it is a named or unnamed instance) what version number it is weather it is a mixed mode authentication what collation it is, since I don't necessarily know the sa password I'll need to connect using windows authentication.
Thanks in advance for any suggestons.
Loading
Dimitrije MisicPosted Aug 8, 2008, 3:39 AM
I solved my problem with a piece of code by James Curran found on Code Project, he devised a class that sends out a Broadcast UDP packet on port 1434, with the contents of just a byte of 0x02, to which each server would respond sending its name etc, the class also had nice testConnection method, witch I tweaked a bit to get some info not contained in server reply like server collation and auth mode. That's it, if you run to this kind of problem you can use this solution, and figuring it out on your own may be a good learning experience but not when you have deadlines.
Peace.
Article