How to connect to SQL Server database from JavaScript in the browser?

前端 未结 8 2068
萌比男神i
萌比男神i 2020-11-22 00:56

Can anybody give me some sample source code showing how to connect to a SQL Server 2005 database from JavaScript locally? I am learning web programming on my desktop.

<
8条回答
  •  清酒与你
    2020-11-22 01:35

    Web services

    SQL 2005+ supports native WebServices that you could almost use although I wouldn't suggest it, because of security risks you may face. Why did I say almost. Well Javascript is not SOAP native, so it would be a bit more complicated to actually make it. You'd have to send and receive SOAP via XmlHttpRequest. Check google for Javascript SOAP clients.

    • http://msdn.microsoft.com/en-us/library/ms345123.aspx - SQL native WebServices
    • http://www.google.com/search?q=javascript+soap - Google results for Javascript SOAP clients

提交回复
热议问题