Showing posts with label Database (Access & MySQL). Show all posts
Showing posts with label Database (Access & MySQL). Show all posts

Sunday, November 6, 2016

SQL Save


Sample Codes Here:

Private Sub cmdD_Click()
Dim a As String

a = MsgBox("Are you sure you want to Delete?", vbQuestion + vbYesNo, "Message")
If a = vbYes Then
con.Execute "Delete * from tblsampledb where FirstName='" & txtFN.Text & "'"
MsgBox "Successfully Delete!", vbCritical, "Message"

txtFN.Text = ""
txtMN.Text = ""
txtLN.Text = ""
txtFN.SetFocus
Exit Sub

End If

End Sub

YOUTUBE CHANNEL: http://www.youtube.com/user/MrJomarflores123

OFFICIAL WEBSITE: http://jstechtutor.blogspot.com/

Auto connection to database

Sample Codes Here
(Module)
Public con As New ADODB.Connection
Public rs As New ADODB.Recordset
Sub main()
con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\SampleDB.mdb;Persist Security Info=False"
con.CursorLocation = adUseClient
con.Open
frmSample.Show
Download sample program here:
http://www.mediafire.com/download/b89cjbdp13h3k41/Auto_Connection.rar
YOUTUBE CHANNEL: http://www.youtube.com/user/MrJomarflores123
OFFICIAL WEBSITE: http://jstechtutor.blogspot.com/

MS access database (2007)

YOUTUBE CHANNEL: http://www.youtube.com/user/MrJomarflores123
OFFICIAL WEBSITE: http://jstechtutor.blogspot.com/