'to define the variables Dim conn, rs, sql 'to create a connection object Set Conn=Server.CreateObject("ADODB.Connection") 'to create a database connection Conn.open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("../db/yourfile.mdb") 'to access a table within a database sql="select * from yourTable" rs.Open sql,Conn,adOpenDynamic,adLockBatchOptimistic 'insert your process codes here 'to close a database connection conn.close set conn = nothing rs.close set rs = nothing |
NOTE
The above sample connection string assumes that the "RUNNING PROGRAM FILE" is located inside your Virtual FTP Server's /www root sub-directory.
No comments:
Post a Comment