How to use JavaScript to get data from a SQL Server database

Source: Internet
Author: User
Tags sql
javascript|server|sqlserver| Data | How does a database use JavaScript to get data from a SQL Server database? ---------------------------------------------------------------var conn = new ActiveXObject ("ADODB. Connection "); Conn. Open ("Data source=190.190.200.100,1433;initial catalog=pubs; User Id=sa; PASSWORD=ASDASD; "); var strSQL = "Select * from Data"; var rs = new ActiveXObject ("ADODB. Recordset "); Rs. CursorType = 3; adOpenStatic Rs. LockType = 1; adLockReadOnly Rs. Open (strSQL, conn)---------------------------------------------------------------okay, you try.

Table Display Datasheet Record

All of the---------------------------------------------------------------upstairs are accessed using ADODB, for SQL Server 2000, you can go to reference SQLXML, which provides an ISAPI to support SQL Server direct query and modify on IIS the specific content should be 1. Allow URL Lookup 2. Allow Templates 3. Allow XPath 4. Allow post The specific information you refer to SQLXML 3.0, in the. NET environment also implements the managed class------------------------------------------------------------------------------- -----------------------------------------------JS reads data from the database--Test success:

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.