Current location - Education and Training Encyclopedia - Graduation thesis - X-sql paper code
X-sql paper code
I am the landlord, continue the above code, please answer in detail, the more detailed the better.

txtPwd。 Text = ""

txtRPwd。 Text = ""

txtPwd。 SetFocus

outlet connection

If ... it will be over.

Dim rs_check as the new ADODB. Record set

Dim rs_add as the new ADODB. Record set

Dim MsgText as a string

Dim strsql as a string

strsql = " select * from UserTable where userId = ' " & amp; txtUser。 Text & "

Set rs_check = ExecuteSQL(strsql,MsgText)

If rs_check. EOF = false then

MsgBox "This user name already exists, please choose another user!" , vbOKOnly+vbInformation, "attention"

txtUser。 Text = ""

txtUser。 SetFocus

rs_check。 close

outlet connection

If ... it will be over.

Dim sqladd as a string

sqladd = "select * from UserTable "

Set rs_add = ExecuteSQL(sqladd,MsgText)

rs_add。 Add new content

rs_add。 Fields(0) = txtUser。 text

rs_add。 Field (1) = txtPwd. text

rs_add。 Fields(2) = txtTUser。 text

rs_add。 Field (3) = txttime. text

rs_add。 update

MsgBox "New user registered successfully!" , vbOKOnly+vbInformation, "attention"

rs_check。 close

rs_add。 close

Unload me.

If ... it will be over.

If ... it will be over.

If ... it will be over.

End joint

Private subcommand 2_Click ()

Unload me.

End joint

Private Sub-Form _Load ()

frmtjyh。 Width = 5565

frmtjyh。 Height = 5850

Dim x0 to long center display.

Dim y0 is the same length.

X0 = screen. width

Y0 = screen. height

X0 = (x0-me. Width)/2

You = (you-me. Height)/2

Me. Move x0, y0

End joint