Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Discover SQL Servers on a LAN
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00589338
Message ID:
00589423
Views:
23
>Hi Mike,
>
>Thank you very much for the help.
>I am succeful on doing what I want from my delelopment machine (which has SQL Server installed) through the following code:
>
>
>LOCAL loDMOApp AS SQLDMO.Application
>LOCAL loNameList
>
>loDMOApp = CREATEOBJECT("SQLDMO.Application")
>loNameList = loDMOApp.ListAvailableSQLServers()
>
>FOR lnServers = 1 TO loNameList.Count
>  ?loNameList.Item(lnServers)
>NEXT
>
>
>It works nice as expected!
>My doubt is that as my application is intended to run on client machines which probably won't have the SQL DMO components installed, how can I install these components on them? Are thare any licensing implications on doing that?
>
>Thanks!

I believe you can distribute the DMO DLLs. MSKB#Q295026 eludes to this. Check out the Redist.Txt file located on the SS installation disk.

FWIW, if you simply want to distribute a single file, you could distribute teh NTWDBLIB.DLL file and use the following code:
clear
#define LOC_SEARCH	1
#define NET_SEARCH	2
#define ALL_SEARCH	bitor(LOC_SEARCH,NET_SEARCH)

declare integer dbserverenum in ntwdblib.dll integer, string@, integer@, integer@

local lcserverbuff, lnbuffsize, lnentries
lcserverbuff = replicate(chr(0),1000)
lnbuffsize = 1024
lnentries = 0

if dbserverenum(ALL_SEARCH,@lcserverbuff,@lnbuffsize,@lnentries) = 0 then
	lcserverbuff = left(lcserverbuff,at(chr(0),lcserverbuff,9))
	dimension lasql[1]
	local lxx
	lcserverbuff = chrtran(lcserverbuff,chr(0),chr(13))
	for lxx = 1 to alines(lasql,lcserverbuff)
		? lasql[lxx]
	endfor
endif
HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Reply
Map
View

Click here to load this message in the networking platform