↑ 收起筛选 ↑
用vB.nEt操作ACCEss数据库
2021-05-20

mports System.Drawing Imports System.ComponentModel Imports System.Windows.Forms Imports System.Data.OleDb Imports System.Data Public Class Form1 Inherits Form Private components As System.ComponentModel.Container =

使用OLEDB方式来操作ACCESS即可. 和ASP没有任何关系. 因为你VB.NET用的是.NET FRAMEWORK内置类库去访问数据库的. 你随便找本VB.NET的书,都能在入门书籍中找到OLEDB的操作代码.

Imports System.Data.Oledb Private Sub Button1_Click() Dim con As OledbConnection = New OledbConnection Dim cmd As OledbCommand con.ConnectionString = "这个字符串自己填" con.Open() cmd = New OledbCommand("这

Imports System.Data.OleDb Public Class Parking Private Sub Parking_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Now_Timer.Enabled = True End Sub Private Sub Now_Timer_Tick(ByVal sender

调用System.Data.OleDb.OleDbConnection,System.Data.OleDb.OleDbCommand类, 数据库一定放在BIN目录里先定义 读取表里面一个数据 mycon = New OleDbConnection("provider=microsoft.jet.oledb.4.0; User ID=Admin ;data source=" &

While myReader.Read cbConCustomer.Items.Add(myReader(0).ToString) End While

请楼主认真学习基础知识吧,不要以为这个几句话就能讲清楚,自己去找教程.提示 VB.NET 连接Access数据库要用到ADO.NET 参考下面几个命名空间 System.Data System.Data.OleDb

1、定义连接字符串并连到数据库2、取出数据到Dataset并绑定到DataGrid3、DataSet本身就是断开的

imports system.data.oledb private sub button1_click() dim con as oledbconnection = new oledbconnection dim cmd as oledbcommand con.connectionstring = "这个字符串自己填" con.open() cmd = new oledbcommand("这里是添加/修改/

如果楼主熟悉VB6,可以直接在项目中添加ADODB的Com引用,这样你就可以像VB6那样操作数据库了!另外.NET Framework中连接数据库要用到ADO.NET.如果要操作Access数据库,要用到System.Data.OleDb命名空间下的许多类.比如

延伸阅读: