1
2
3 <%
4
5 Dim cnnSimple ' ADO connection
6 Dim rstSimple ' ADO recordset
7 Set cnnSimple = Server.CreateObject("ADODB.Connection")
8
9 ' DSN
10 cnnSimple.Open "DSN=_mysqlConn;"
11
12 Set rstSimple = cnnSimple.Execute("SELECT * FROM tblTest")
13
14
15 %>
16 <P> Connecting to mySQL DB with ODBC DSN P>
17
18 <table border="1">
19 <%
20 Do While Not rstSimple.EOF
21 %>
22 <tr>
23 <td><%= rstSimple.Fields("id").Value %>td>
24 <td><%= rstSimple.Fields("name").Value %>td>
25 tr>
26 <%
27 rstSimple.MoveNext
28 Loop
29 %>
30 table>
31 <%
32 ' Close our recordset and connection and dispose of the objects rstSimple.Close Set rstSimple = Nothing cnnSimple.Close Set cnnSimple = Nothing
33
34 cnnSimple.close
35 %>
36
37
38
- Home
-
Store
- Browse All
- Linux Shared Hosting Plan
- Linux Cloud Server
- Linux Dedicated Server
- Linux Reseller Web Hosting Plan
- Windows Shared Hosting Plan
- Windows Cloud Server
- Windows Dedicated Server
- Windows Reseller Web Hosting Plan
- Sharepoint Hosting
- VPS Server
- SSL Certificates
- SEO Services
- Email Hosting
- Sitelock
- webhostforasp.net.au
- Register a New Domain
- Transfer Domains to Us
- Announcements
- Knowledgebase
- Network Status
- Affiliates
- Contact Us
-
More