[ www._.tk @ 04.02.2006. 13:38 ] @
Kako se povezati sa asp.net-a(jezik VB) na Access bazu podataka. Dodavanje redova u tabelu, brisanje redova i mjenjanje sadrzaja redova. |
[ www._.tk @ 04.02.2006. 13:38 ] @
[ mirobor @ 04.02.2006. 18:28 ] @
Imports System.Data
Imports System.Data.OleDb 'ovo gore je jako vazno Public Class WebForm1 Inherits System.Web.UI.Page #Region " Web Form Designer Generated Code " 'This call is required by the Web Form Designer. <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() End Sub Protected WithEvents DataGrid1 As System.Web.UI.WebControls.DataGrid 'NOTE: The following placeholder declaration is required by the Web Form Designer. 'Do not delete or move it. Private designerPlaceholderDeclaration As System.Object Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init 'CODEGEN: This method call is required by the Web Form Designer 'Do not modify it using the code editor. InitializeComponent() End Sub #End Region Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim HalloSjeverniVjetar As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Microsoft Office\OFFICE11\SAMPLES\northwind.mdb;Persist Security Info=False") Dim str As String = "select * from Products" Dim PodaciPretvarac As New OleDbDataAdapter(str, HalloSjeverniVjetar) Dim dataKosnica As New DataSet PodaciPretvarac.Fill(dataKosnica, "Proizvodi") 'Prikazi podatke u datagridu DataGrid1.DataSource = dataKosnica.Tables("Proizvodi") DataGrid1.DataBind() End Sub 'Ovo je tek pocetak, za update, insert , delete, sorting, paging itd, gledaj na guglu End Class Copyright (C) 2001-2025 by www.elitesecurity.org. All rights reserved.
|