'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 "Driver={SQL Server} ;Server=ContactUsForTheServerIPToUse ;Database=YourDatabaseName ;Uid=YourUserID ;Pwd=YourPassword ;" '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