You probably need to add some additional information to help us help you.
This article by my friend Geertjan Wielenga, obviously using Netbeans :-) provides a quick introduction:
Which kind of web service do you have on the server? (SOAP, RESTful, etc)
In both cases you're leveraging XMLHttpRequest.
If you can choose, having a RESTful web service that can comunicate using JSON is way more easy.
In addition, you might want to refer to Mike Gledhill's article on WCF JSON Webservice here : Www.mikesknowledgebase.com
Alternatively, you can also use Ruby on Rails to connect to SQL Server, RoR already has JSON support built in.