'mostly i used this code when im in coding vb6database
'Begin Here-----------------
dim dbs as database,rst as recordset
'-----------
Form_load()
set dbs=opendatabase(app.path & "\database.mdb")
'-----------
command()
set rst=dbs.openrecordset(" SELECT * FROM table WHERE command1='" & text1.text & "' and command2='" & text2.text & "';")
if rst.recordcount <> o then
Action
end if
'------
delete_data()
dbs.execute("delete from table where record='" & text.text & "';")
'------
'----deleting using data
data1.recordset.delete
data1.recordset.movenext
'--------------------------
add_command()
set rst=dbs.openrecordset("table")
rst.addnew
rst!name=text.text
rst.update
'--------
edit_command()
set rst=dbs.openrecordset("table")
rst.edit
rst!name=text.text
rst.update
'------
rst.addnew
rst!name=text.text
rst.update
-----end--- for some question just email me