Call now: (800) 766-1884  



 Home


 SQL Server Tips
 SQL Server Training

 SQL Server Consulting
 SQL Server Support
 SQL Server Remote DBA



 Articles
 Services
 SQL Server Scripts
 Scripts Menu



 

 

 

 
 

SQL Server

SQL Server Tips by Gama and Naughter Consulting

 


Testing the Code (COM Support)

To test the code as a late bound COM object, a simple Windows JScript script is provided called “ServerReachable.js”. This is located in a “JScript” directory underneath the XP code directory. It contains the following code:

var objServerReachable = new ActiveXObject("XP_SERVERREACHABLE.ServerReachable");

var ServerToPing = "192.168.1.5";
var Reachable = objServerReachable.ServerReachable(ServerToPing);

WScript.Echo("Reachable: " + Reachable);

objServerReachable = null;

To test the COM support from an early bound client, a simple Visual Basic 6 client is supplied in a “VB6” directory. To connect to the COM DLL, a reference for the “XP_SERVERREACHABLE 1.0 Type Library” is added to the project by using the “Project - References” menu item in Visual Basic. The project contains a very simple form with 2 text boxes and a button. The following code is run when the “Ping” button is clicked:

Dim objServerReachable As New XP_SERVERREACHABLELib.ServerReachable
MousePointer = vbHourglass
Text2.Text = objServerReachable.ServerReachable(Text1.Text)
MousePointer = vbDefault
Set objServerReachable = Nothing


The above book excerpt is from:

Super SQL Server Systems
Turbocharge Database Performance with C++ External Procedures

ISBN: 0-9761573-2-2
Joseph Gama, P. J. Naughter

 http://www.rampant-books.com/book_2005_2_sql_server_external_procedures.htm

 


 

 

 

Burleson Consulting Remote DB Administration


 

 


 

 

 

 

 
Burleson is the America's Team

Note: The pages on this site were created as a support and training reference for use by our staff of DBA consultants.  If you find it confusing, please exit this page.

Errata?  SQL Server technology is changing and we strive to update our SQL Server support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:and include the URL for the page.
 


Burleson Consulting
SQL Server database support

 

Copyright © 1996 -  2013 by Vaaltech Web Services. All rights reserved.

Hit Counter