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
%>

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

SQL Server Connection String

string str = 'server=localhost;database=dbname;uid=dbuser;pwd=dbpass;'; dbname : Your Database...

MS Access DSN Connection Example

<% set rs=Server.CreateObject("ADODB.Recordset") db="DSN=MyDSN;UID=;PWD=;" SQL = "SELECT *...

I get a IISPassword error HTTP ERROR 500 when I try to view my site.

The reason you are seeing this is generally because you have a .htaccess file in your directory....

CDOSYS Sample Email Code

<% Dim ObjSendMail Dim iConf Dim Flds   Set ObjSendMail =...

Frontpage Editing

QUESTION ------------------------------------------------------ How frontpage could be used to...

Powered by WHMCompleteSolution