Home > Software engineering >  Please have a look at how to solve the problems about the code
Please have a look at how to solve the problems about the code

Time:09-29

Private Sub Command1_Click ()
If the Trim (Form1. Usertype. Text)="students" Then
S999=0
End the If
If the Trim (Form1. Usertype. Text)="administrator" Then
S999=1
End the If
If the username. Text="" Then
MsgBox "the user name cannot be empty!!!!! "
The username. SetFocus
The Exit Sub
End the If
If userpwd. Text="" Then
MsgBox "password cannot be empty!!!!! "
Userpwd. SetFocus
The Exit Sub
End the If
Dim the rs As New ADODB. You
. Set the rs=DataEnv rsabc//////wrong here
Dim STRSQL As String
STRSQL="select * from the users where yonghuming='" & amp; The username. Text & amp; "'
"Rs. The Open STRSQL
If userpwd. Text=rs. Fields (" mima ") And usertype. Text=rs. Fields (" quanxian ") Then
Form4. Show
Unload Me
The Else
MsgBox "user name or password error, please log in again!! "
The username. Text=""
Userpwd. Text=""
End the If
Rs. Close

End Sub
This is a system of landing interface, Set the rs=DataEnv. Rsabc this line of code that there is a problem, what reason is this?

CodePudding user response:

What wrong all don't say!
Guess: engineering Data without design rsabc Enviroment; Or the database connection is wrong, rsabc query fails,

CodePudding user response:

I run time, the error message is that don't understand what you mean

CodePudding user response:

1 open the "project" - "reference", see if quotes Microsoft DataEnvironment Instance 1.0 libraries, such as

2 check code, look to whether have DataEnv instantiation, and opened the rsabc such record set,

CodePudding user response:

Ctrl + R to open the Project Explorer,
Third button Toggle Folders according to the state,
Is there a Designers directory under the project?
Designers have a DateEnvironment directory object (according to your code name should be DataEnv)?
Double-click the DataEnv, open the design picture, rsabc directory tree layer 3?

If not, you get the source code is not complete!

CodePudding user response:

reference of123 reply: 3/f
1 open the "project" - "reference", see if quotes Microsoft DataEnvironment Instance 1.0 libraries, such as

DateEnvironment is intrinsic function, and there is no need to quote,
  • Related