LiveZilla Live Help

Portal Home > Knowledgebase > Windows > MS Access DSN Less Connection Example


MS Access DSN Less Connection Example




Here is the example code for dsn less ms access connection.

<%
Set db = Server.CreateObject("ADODB.Connection")
db.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("database.mdb") & ";"

db.execute("INSERT INTO MyTable VALUES ('Dan Hendricks', 22)")
set rs=db.execute("SELECT * FROM MyTable")

rs.MoveFirst
Do Until rs.EOF
Response.Write rs("NAME") & "<br>"
rs.MoveNext
Loop
rs.Close
%>



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Frontpage Editing (Views: 452)
CDOSYS Sample Email Code (Views: 1048)

Powered by WHMCompleteSolution