1.rownumberԴ??
rownumberԴ??
在窗体中加入两个txt框,两个按钮。界面设计如上图所示。支付源码授权官网
数据库中设计access表,adminuser,176源码网表中创建username、购物竞猜源码passwrod两个文本字段。access文件名称为my.mdb.其源代码如下:
Imports System.Data
Imports System.Data.OleDb
Public Class LoginFrm
Inherits System.Windows.Forms.Form
Public ADOcmd As OleDbDataAdapter
Public ds As DataSet = New DataSet
Public mytable As Data.DataTable
Public myrow As Data.DataRow
Public rownumber As Integer
Public searchsql As String
Public cmd As OleDbCommandBuilder
Public Function ExecuteSQL(ByVal SQL As String, ByVal table As String)
ADOcmd = New OleDbDataAdapter(SQL, "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" Application.StartupPath() "\my.mdb")
ADOcmd.Fill(ds, table)
mytable = ds.Tables.Item(0)
rownumber = 0
myrow = mytable.Rows.Item(rownumber)
End Function
#Region " Windows 窗体设计器生成的代码 "
Public Sub New()
MyBase.New()
'该调用是 Windows 窗体设计器所必需的。
InitializeComponent()
'在 InitializeComponent() 调用之后添加任何初始化
End Sub
'窗体重写 dispose 以清理组件列表。
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Windows 窗体设计器所必需的
Private components As System.ComponentModel.IContainer
'注意: 以下过程是 Windows 窗体设计器所必需的
'可以使用 Windows 窗体设计器修改此过程。
'不要使用代码编辑器修改它。