Click here to Skip to main content
15,890,185 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Please provide, with example, connecting classic asp with MS ACCESS


It's quite urgent

Advance Thanks
Posted
Updated 13-Dec-10 22:16pm
v3
Comments
Abdul Quader Mamun 14-Dec-10 2:21am    
Spelling check.
Dalek Dave 14-Dec-10 4:16am    
Edited for Spelling, Grammar and Syntax.

Thank you for your question.
VB
Dim strConn
strConn= "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=C:\DatabaseFolder\AccessDatabase.mdb;DefaultDir=YourDefaultDir;UID=YourUserID;PWD=YourPassword;"

Dim oConnection
Set oConnection = Server.CreateObject("ADODB.Connection")

oConnection.Open strConn

Dim recordSet
set recordSet= Server.CreateObject("ADODB.RecordSet")

recordSet.Open "SELECT * FROM TableA ", oConnection, adOpenForwardOnly, adLockOptimistic



Thanks,
Mamun
 
Share this answer
 
v4
Comments
Dalek Dave 14-Dec-10 4:16am    
Nice easy answer!
Abdul Quader Mamun 14-Dec-10 5:10am    
Thanks Dalek Dave!
I tried out with this,
but wht if i wnt DSN connection.........
Plz Ne 1 help me..........:confused:
 
Share this answer
 
Comments
Toniyo Jackson 15-Dec-10 4:44am    
Don't write your comments here. You have add comment button below all answers. so write your comments below the appropriate answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900