|
-
Sep 11th, 2000, 09:11 AM
#2
New Member
hello!
let me say what i do(not always):
suppose i have only two textboxes:text1 and text2
First i create a function to verify if are null values in textboxes:
Public Function Verify() as Boolean
verify=true
if trim(text1)="" or trim(text2)="" then
verify=false
exit function
end if
End Function
Let's say i make insert through button's event Command1_click
Private Sub Command1_Click()
if verify then
strSQL = "insert into tablename values('" + txtUser.Text + "','" + txtPassw.Text + "')"
rsUser.Open strSQL, conn, adOpenKeyset, adLockOptimistic
end if
end sub
Anyway i passed through the code for connection to database....
The point is:i use Insert for a new record and Update for Edit a record...are faster then select....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|