Jump to content

How to connect a web form to a MS access DB on sever


Guest kamalesh

Recommended Posts

Guest kamalesh

Hello Friends,I am really new to server side scripting.MY QUESTION--How to connect a web form to a MS access DB on severI mean User fills a web form ,I need to store the details what he filled into the data base which is on a server.I dont have any idea from where to strat and where to end.Plz let me know what technologies do i need to know to implement this,and can any one have code for this process.thanking u kamalesh

Link to comment
Share on other sites

  • 2 weeks later...

hi when u connect asp with db u will use ADO Interface so this scripts connect asp with access db set conn=Server.CreateObject("ADODB.Connection")conn.Provider="Microsoft.Jet.OLEDB.4.0"conn.Open(Server.Mappath("/mydb/users.mdb")) set rs = Server.CreateObject("ADODB.recordset")rs.Open "Select * FROM matar", conndo until rs.EOF for each x in rs.Fields Response.Write(x.value ) Response.Write(x.name & "<br />") next rs.MoveNextlooprs.closeconn.closethe first line 2 create a connection var called conn the second line 2 tell asp that the db is access db the third line to establish the connection with the db .. the mydb folder must be locate in the www folder inside the inetpub .. user.mdb the name of the db . the forth line is to create a recordset (DATA READER) form the db ,, rs is a var the fifth line to open the rs connection and get all data from matar table then we make a for loop to get the data form all record the last 2 lines to close the connection with db .GooD Luckmatar

Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...