VB+SQL教学管理系统哦rivate Sub cmdok_Click() Dim txtsql As String Dim mrc As ADODB.Recordset Dim msgtext As String If Trim(txtusername.Text) = "" Then MsgBox "请输入用户名称!", vbOKOnly, "警告" Exit Sub End If '判断输入的密码是否一致 If Trim(txtpassword1.Text ) Trim(txtpassw
很不错的哦,很好的Option Explicit Public gUserName As String Public gUserKind As String Public gLoginSucceeded As Boolean ' ****************************************************************************** '过程名:Main '说 明:系统启动函数 '参 数:无 '返回值:无 ' *****************
Dim s As String Dim rs As New ADODB.Recordset s = "Driver={SQL Server}; Database=trsip; UID=sa; PWD=oallserver; Server=10.47.1.12 " conn.ConnectionString = s conn.Open txtsql = "select top 1 * from book" Set rs = New ADODB.Recordset rs.Open txtsql,
Private Sub Command1_Click() Dim conn As New ADODB.Connection Dim s As String Dim rs As New ADODB.Recordset Dim telephone As String Dim txtsql As String telephone = Trim(Text1.Text) '**************************************************************** *
VB用ADO方式连接数据库的一些操作,如:ACCESS、MS-SQL等 引用ADO库或用ADO控件 Dim txtSQL As String Dim MsgText As String Dim MRC As ADODB.Recordset txtSQL = "SELECT * FROM jobs" Set MRC = ExecuteSQL(txtSQL, MsgText) If Not (MRC.EOF) Then MsgBox MsgText, vbOKOnly + vbExclamatio
很好的文档,有利于帮助学生课程设计 登陆界面设计的关键代码 Private Sub Command1_Click() Dim mrc As ADODB.Recordset txtsql = "select username from use where username='" & Trim(Text1.Text) & "'" Set mrc = ExecuteSQL(txtsql) If mrc.EOF = True Then MsgBox " 用户名错误!", vbExclamation +
vb学生管理系统源代码 部分代码 Public UserName As String Public txtSQL As String 'use to store record SQLsentence Public dream As ADODB.Recordset 'use to store record object Public Msgtext As String '用来存放返回信息 Public OK As Boolean ' 'Public db As String Public Sub
Option Explicit Dim mrc As ADODB.Recordset Public txtSQL As String Dim MsgText As String Private Sub Form_Load() ShowTitle ShowData flagEdit = True End Sub Private Sub Form_Resize() If Me.WindowState vbMinimized And fMainForm.WindowState vbMinimiz
经过分析,我们使用 MICROSOFT公司的 VISUAL BASIC开发工具,利用其提供的各种面向对象的开发工具,尤其是数据窗口这一能方便而简洁操纵数据库的智能化对象,首先在短时间内建立系统应用原型,然后,对初始原型系统进行需求迭代,不断修正和改进,直到形成用户满意的可行系统。 Dim aa As Integer txtsql = "" If Trim(Text1(0).Text) "" Then aa = 1 If txtsql = "" Then txtsql = "xj.学号='"