-
2. Whether the user's password is text2, whether to transfer to the next step, whether to exit;
3. Follow-up operations.
PS: Look at "My Messages".
-
Dizzy. This is a bit long.,It's not clear to say.,It's recommended that you go to msdn to see.,If it's not installed.,You can search for msdn in it.,There must be a typical case in it! You can see what is written in the case!
-
VB connects to the database. Check the username and password. If the input is incorrect three times, the program exits.
option explicit
dim cnt as integer 'Record the number of determinations.
private sub cmdcancle_click()
unload me
end sub
private sub cmdok_click()
dim sql as string
dim rs_login as new
dim conn as new
provider=; data source=" & "Fixed. mdb"
if trim( = "" then
msgbox "The username cannot be empty, please re-enter it! "
elsesql = "select * from user table where user id='" & trim( &"'"
rs_ sql, conn, adopenkeyset, adlockpessimistic
if rs_ = true then
msgbox "If you don't have this user, please re-enter! ", vbokonly + vbexclamation, ""
elseusername =
if trim(rs_ = trim( then
unload me
elsemsgbox "The password is incorrect, please re-enter it! ", vbokonly + vbexclamation, ""
end if
end if
end if
cnt = cnt + 1
if cnt = 3 then
unload me
end if
end sub
private sub form_keypress(keyascii as integer)
if keyascii = 13 then
call cmdok_click
end if
end sub
private sub form_load()
cnt = 0
end sub
-
dim mm1 as string
dim user1 as string
user1 = trim(
mm1 = trim(
if user1 = "" or mm1 = "" thenrespone = msgbox("Username and password can't be empty! ", vbyes, "Prompt! ")
elsesql = "select count(*)from table name where username field ='" + user1 + "'"
set rs =
if rs(0) <0 then
sql = "select password field from table name where password field ='" + mm1 + "'"
set rs =
if mm1 = rs(1) then
Form. show
end if
elsemsgbox "The username does not exist, please re-enter it! "
end if
end if
-
Ways to add parts: Microsoft Ado Data Control
Add an ADODC control to the form, then set the properties of the ADODC control, select "Generate" on the side of the "Use Connection String" item, then select the oracle driver, and set other conditions (libraries, users, passwords, etc.), copy out the generated string, assign the value, and then you can delete the ADODC control.
-
You can connect to the Oracle database through the property page of the ADodC data access control.
1) Create a data project and add an ADODC data access control to the form. Mouse select ADODC control - right-click - ADODC properties - use connection string - generated.
2) Select Microsoft OLE DB Provider for Oracle and go next.
3) Fill in the required content according to the data link properties dialog box and test the connection. Point OK, and finally get the connection string on the ADODC property page, copy the string, and you can use it directly as an ADodC data access control, or in ** for an ADodc control or ADO data access object.
1. Create an access database and create a new table in the database—that is, an additional table. By setting the property values of the attached table, make it linked to the database you want to access. >>>More
If it's multiple months, just modify the link.
Then submit the database query: >>>More
This is a nuisance, the memory is occupied.
You're going to have to look it up"The memory cannot be read"Find relevant solutions, there are many on the Internet. >>>More
select ,from emp e left jion dept don ;
Left Company. The left link is, the left side prevails, and the right side is useless to make up for it. >>>More
1.You may be missing the database connection statement of adodC1, and only the SQL statement. >>>More