散尽身家 求一个答案
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form 说法论道司考系统
BackColor = &H00808000&
Caption = "说法论道司考系统"
ClientHeight = 5670
ClientLeft = 60
ClientTop = 450
ClientWidth = 8535
LinkTopic = "Form1"
ScaleHeight = 5670
ScaleWidth = 8535
StartUpPosition = 2 '屏幕中心
Begin MSAdodcLib.Adodc Adodc1
Height = 495
Left = 1920
Top = 3240
Width = 4215
_ExtentX = 7435
_ExtentY = 873
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 2
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and Settings\lina\桌面\db2.mdb;Persist Security Info=False"
OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and Settings\lina\桌面\db2.mdb;Persist Security Info=False"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "table"
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.TextBox txtPassword
BackColor = &H00FFFFC0&
DataField = "password"
DataSource = "Adodc1"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
IMEMode = 3 'DISABLE
Left = 3480
PasswordChar = "*"
TabIndex = 6
Top = 2400
Width = 3135
End
Begin VB.TextBox txtUserName
BackColor = &H00FFFFC0&
DataField = "user_name"
DataSource = "Adodc1"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 3480
TabIndex = 5
Top = 1560
Width = 3135
End
Begin VB.CommandButton cmdCanel
BackColor = &H00808000&
Caption = "退 出"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 735
Left = 5160
TabIndex = 2
Top = 3840
Width = 1575
End
Begin VB.CommandButton cmdOK
BackColor = &H00808000&
Caption = "登 陆"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 735
Left = 1680
TabIndex = 1
Top = 3840
Width = 1575
End
Begin VB.Label Label4
BackColor = &H00808000&
Caption = "Copyright Powered By Hq^Lina"
BeginProperty Font
Name = "宋体"
Size = 15
Charset = 134
Weight = 400
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2160
TabIndex = 7
Top = 4800
Width = 4335
End
Begin VB.Label Label3
BackColor = &H00808000&
Caption = "密 码"
BeginProperty Font
Name = "华文新魏"
Size = 18
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 1440
TabIndex = 4
Top = 2520
Width = 1335
End
Begin VB.Label Label2
BackColor = &H00808000&
Caption = "用 户 名"
BeginProperty Font
Name = "华文新魏"
Size = 18
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 1440
TabIndex = 3
Top = 1560
Width = 1335
End
Begin VB.Label Label1
BackColor = &H00808000&
Caption = "说法论道司考系统"
BeginProperty Font
Name = "华文行楷"
Size = 42
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 855
Left = 960
TabIndex = 0
Top = 240
Width = 6855
End
End
问题点数:0、回复次数:8Top
1 楼gaozhiling(ASP菜鸟)回复于 2005-06-01 15:00:11 得分 0
还有:
Attribute VB_Name = "说法论道司考系统"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public OK As Boolean
Dim miCount As Integer
Private Sub Form_Load()
OK = False
miCount = 0
End Sub
Private Sub CcmdOK_Click()
Dim txtSQL As String
Dim mrc As ADODB.Recordset
Dim UserName As String
Dim MsgText As String
UserName = ""
If Trim(txtUserName.Text = "") Then
MsgBox "没有这个用户,请重新输入用户名!", vbOKOnly + vbExclamation, "警告"
txtUserName.SetFocus
Else
txtSQL = "select * from table where user_name= '" & txtUserName.Text & " '"
Set mrc = Executesql(txtSQL, MsgText)
If mrc.EOF = True Then
MsgBox "没有这个用户,请重新输入用户名!", vbOKOnly + vbExclamation, "警告"
txtUserName.SetFocus
Else
If Trim(mrc.Fields(1)) = Trim(txtPassword.Text) Then
OK = True
mrc.Close
Me.Hide
UserName = Trim(txtUserName.Text)
Else
MsgBox "输入密码不正去,请重新输入!", vbOKOnly + vbExclamation, "警告"
txtPassword.SetFocus
txtPassword.Text = ""
End If
End If
End If
Exit Sub
End Sub
Private Sub cmdCanel_Click()
OK = False
Me.Hide
End Sub
Private Sub cmdOK_Click()
Dim txtSQL As String
Dim mrc As ADODB.Recordset
Set mrc = New ADODB.Recordset
Dim MsgText As String
Dim UserName As String
UserName = ""
If Trim(txtUserName.Text = "") Then
MsgBox "没有这个用户,请重新输入用户名!", vbOKOnly + vbExclamation, "警告"
txtUserName.SetFocus
Else
txtSQL = "select * from table where user_ID= '" & txtUserName.Text & "'"
Set mrc = Executesql(txtSQL, MsgText)
If mrc.EOF = True Then
MsgBox "没有这个用户,请重新输入用户名!", vbOKOnly + vbExclamation, "警告"
txtUserName.SetFocus
Else
If Trim(mrc.Fields(1)) = Trim(txtPassword.Text) Then
OK = True
mrc.Close
Me.Hide
UserName = Trim(txtUserName.Text)
Else
MsgBox "输入密码不正去,请重新输入!", vbOKOnly + vbExclamation, "警告"
txtPassword.SetFocus
txtPassword.Text = ""
End If
End If
End If
Exit Sub
End SubTop
2 楼dobest1204(人生不过百年,何不放手一博)回复于 2005-06-01 15:09:26 得分 0
想问什么?Top
3 楼gaozhiling(ASP菜鸟)回复于 2005-06-01 15:14:49 得分 0
就想问哪里错了?还是少了什么?Top
4 楼gaozhiling(ASP菜鸟)回复于 2005-06-01 15:15:21 得分 0
就想问哪里错了?还是少了什么?Top
5 楼wangzhj12(我想说)回复于 2005-06-01 15:32:49 得分 0
出现什么错误的啊!!Top
6 楼gaozhiling(ASP菜鸟)回复于 2005-06-01 15:50:12 得分 0
Line 14: Class MSAdodcLib.Adodc of control adoDB1 was not a loaded control class. 这个错误Top
7 楼dobest1204(人生不过百年,何不放手一博)回复于 2005-06-01 16:24:40 得分 0
是不是 没有在,工程-部件 里面引用 microsoft ADO data control 6.0啊Top
8 楼gaozhiling(ASP菜鸟)回复于 2005-06-01 17:16:59 得分 0
顶起来Top




