1 / 6

การพัฒนาโปรแกรมประยุกต์บนเว็บ

การพัฒนาโปรแกรมประยุกต์บนเว็บ. Data Selecting by ASP. มหาวิทยาลัยโยนก จังหวัดลำปาง ศูนย์กลางความรู้และภูมิปัญญาแผ่นดิน http://www.yonok.ac.th. อ.บุรินทร์ รุจจนพันธุ์ . ปรับปรุง 23 มิถุนายน 2550. DSNLess + !recordset (1/5). <% set c = server.createobject(" adodb.connection ")

toconnell
Download Presentation

การพัฒนาโปรแกรมประยุกต์บนเว็บ

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. การพัฒนาโปรแกรมประยุกต์บนเว็บการพัฒนาโปรแกรมประยุกต์บนเว็บ Data Selecting by ASP มหาวิทยาลัยโยนก จังหวัดลำปาง ศูนย์กลางความรู้และภูมิปัญญาแผ่นดิน http://www.yonok.ac.th อ.บุรินทร์ รุจจนพันธุ์ . ปรับปรุง 23 มิถุนายน 2550

  2. DSNLess + !recordset (1/5) <% set c = server.createobject("adodb.connection") c = "driver={microsoft access driver (*.mdb)}; " c = c & "dbq=" & server.mappath("dthai97.mdb") sql = "select * from tbthai" set rs = c.execute(sql) do while not rs.eof response.write(rs("fid") & "<br>") rs.MoveNext loop c.close set rs = nothing set c = nothing %> แฟ้มข้อมูลทดสอบจาก http://www.thaiabc.com/asp/dthai97.mdb

  3. DSNLess + recordset (2/5) <% set rs = server.createobject("adodb.recordset") c = "driver={microsoft access driver (*.mdb)}; " c = c & "dbq=" & server.mappath("dthai97.mdb") sql = "select * from tbthai" rs.open sql, c, 1, 3 response.write(rs.recordcount & "<br>") do while not rs.eof response.write(rs("fid")&"<br>") rs.MoveNext loop rs.close %>

  4. OLEDB Provider (3/5) <% set c = server.createobject("adodb.connection") c.open "provider=microsoft.jet.oledb.4.0; data source=" & server.mappath("dthai97.mdb") sql = "select * from tbthai" set rs = c.execute(sql) do while not rs.eof response.write(rs("fid") & "<br>") rs.MoveNext loop c.close set rs = nothing set c = nothing %>

  5. DSN (Data Source Name) + !Recordset (4/5) <% set c = server.createobject("adodb.connection") c.open "xdthai97","","" sql = "select * from tbthai" set rs = c.execute(sql) do while not rs.eof response.write(rs("fid") & "<br>") rs.MoveNext loop c.close set rs = nothing set c = nothing %>

  6. DSN (Data Source Name) + Recordset (5/5) <% set c = server.createobject("adodb.connection") c.open "xdthai97","","" set rs = server.createobject("adodb.recordset") sql = "select * from tbthai" rs.open sql, conn, 1, 3 response.write(rs.recordcount & "<br>") do while not rs.eof response.write(rs("fid") & "<br>") rs.MoveNext loop c.close set rs = nothing set c = nothing %>

More Related