Question


Ajay

how to connect database in asp.net ?

Date = 2015-04-08

Comments by experts


Sandeep Katrodiya
Date = 2015-04-08

//create access file with name test_db.mdb than use thiscode or change name of mdb file

<%@ Import Namespace="System.Data.OleDb" %>
<script runat="server">
sub Page_Load
dim dbcon
dbcon=New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; data source=" & server.mappath("test_db.mdb"))
dbcon.Open()
end sub
</script>


Type your Comment below and click to send comment