<%@ Import Namespace="System.Data.Oledb" %> <script language="vb" runat="server"> Sub Page_Load() Dim oleConn As OleDbConnection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;data source=" & Server.MapPath("db.mdb")) oleConn.Open() End Sub </script>
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim objBaglanti As New SqlConnection Dim objrow As DataRow objBaglanti.ConnectionString = "Data Source=TEHLIKE;Initial Catalog=vt;User ID=kullaniciadi" objBaglanti.Open() End Sub
<%@ Import Namespace="System.Data.Oledb" %>
<script language="vb" runat="server">
Sub Page_Load()
Dim oleConn As OleDbConnection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;data source=" & Server.MapPath("db.mdb"))
oleConn.Open()
End Sub
</script>
Şeklinde bağlanabilirsin.
Bu mesaja 1 cevap geldi. Cevapları Gizle
imports system.data.sqlclient
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim objBaglanti As New SqlConnection
Dim objrow As DataRow
objBaglanti.ConnectionString = "Data Source=TEHLIKE;Initial Catalog=vt;User ID=kullaniciadi"
objBaglanti.Open()
End Sub