[help/req] vb6 adodc login logout database - PINOYDEN


Go Back   PINOYDEN > PC Zone > Programming

Welcome to PinoyDen Forums.

You are currently browsing our forum as a guest, please consider registering to get full access to all of our forum features, download free games, get help for your pc and cellphone problems and learn new mobile tricks like how to browse the internet using your cellphone for free. All that and more, so what are you waiting for, JOIN us now!!!! Click here to register...
 Topic: [help/req] vb6 adodc login logout database  (Read 1043 times)
0 Members and 1 Guest are viewing this topic.
Pages: [1]   Go Down
08-26-11 04:33 PM
  • Sr. Member
  • ****
  • Male Offline
 
Posts: 5293
Thank You: 135
Reputation: 2
palimos23 has no influence.barely matters.is working their way up.might someday be someone...is on the verge of being accepted.is a rising star!has a powerful will.is a force to reckon with.has great potential!has an aura about them.is leading the good life!is awe-inspiring!
Mga ka pwede ba makahingi sample program or sourcecodes na pang adodc ms acess database na may log in logout search addnew at delete ng madami sa makakatulong
Reply #1
08-26-11 04:46 PM
  • Full Member
  • ***
  • Male Offline
 
Posts: 4037
Thank You: 62
Reputation: 0
rymn93 has no influence.barely matters.is working their way up.might someday be someone...is on the verge of being accepted.is a rising star!has a powerful will.is a force to reckon with.has great potential!has an aura about them.is leading the good life!is awe-inspiring!
sayang di ako naka pc upload ko sana program ko..
Reply #2
08-26-11 05:03 PM
  • Sr. Member
  • ****
  • Male Offline
 
Posts: 5293
Thank You: 135
Reputation: 2
palimos23 has no influence.barely matters.is working their way up.might someday be someone...is on the verge of being accepted.is a rising star!has a powerful will.is a force to reckon with.has great potential!has an aura about them.is leading the good life!is awe-inspiring!
Quote:
Originally Posted by : rymn93 on 08-26-11 04:46 PM
sayang di ako naka pc upload ko sana program ko..
po ka sa pag angat, ako din dati thesis ko ito nabura, ngayon kailangan sa aaplyan,
Reply #3
08-26-11 09:32 PM
  • Full Member
  • ***
  • Male Offline
 
Posts: 375
Thank You: 60
Reputation: 1
acgilbert has no influence.barely matters.is working their way up.might someday be someone...is on the verge of being accepted.is a rising star!has a powerful will.is a force to reckon with.has great potential!has an aura about them.is leading the good life!is awe-inspiring!
Quote:
Mga ka  pwede ba makahingi sample program or sourcecodes na pang adodc ms acess database na may log in logout search addnew at delete  ng madami sa makakatulong


just go to planet-source-code.com .. maraming sample dyan!
Reply #4
08-26-11 10:45 PM
  • Sr. Member
  • ****
  • Male Offline
 
Posts: 5293
Thank You: 135
Reputation: 2
palimos23 has no influence.barely matters.is working their way up.might someday be someone...is on the verge of being accepted.is a rising star!has a powerful will.is a force to reckon with.has great potential!has an aura about them.is leading the good life!is awe-inspiring!
Quote:
Originally Posted by : acgilbert on 08-26-11 09:32 PM
just go to planet-source-code.com .. maraming sample dyan!
masyado po advance dito puru module na. Adodc lang kailangan e anyays
Reply #5
08-28-11 06:25 AM
  • READ MY MIND?
  • Tech Support
  • *
  • Male Offline
 
Posts: 5750
Thank You: 1312
Reputation: 46
Jigsaw has no influence.barely matters.is working their way up.might someday be someone...is on the verge of being accepted.is a rising star!has a powerful will.is a force to reckon with.has great potential!has an aura about them.is leading the good life!is awe-inspiring!
May ole ka na Ba na object ? yung adodc   ... anu Ba gamit mo ms access ?

Reply #6
08-28-11 08:43 AM
  • Sr. Member
  • ****
  • Male Offline
 
Posts: 5293
Thank You: 135
Reputation: 2
palimos23 has no influence.barely matters.is working their way up.might someday be someone...is on the verge of being accepted.is a rising star!has a powerful will.is a force to reckon with.has great potential!has an aura about them.is leading the good life!is awe-inspiring!
Ms acess lang po database nya
Reply #7
08-29-11 01:58 AM
  • Full Member
  • ***
  • Male Offline
 
Posts: 375
Thank You: 60
Reputation: 1
acgilbert has no influence.barely matters.is working their way up.might someday be someone...is on the verge of being accepted.is a rising star!has a powerful will.is a force to reckon with.has great potential!has an aura about them.is leading the good life!is awe-inspiring!
Public dbConnection As ADODB.Connection
Public rsStudent As ADODB.Recordset

' This is for the connection to your database
' call this in you form_load( how?   call dbConnect
Public Sub dbConnect()
Set dbConnection = New ADODB.Connection
dbConnection.CursorLocation = adUseClient
dbConnection.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" _
  & App.Path & "\IPADatabase.mdb;Jet OLEDB:Database;"
End Sub

Private Sub Form_Load()
Call dbConnect
'Open table for Student
Set rsStudent = New ADODB.Recordset
rsStudent.Open "Select * from Student", dbConnection, adOpenStatic, adLockOptimistic
End Sub


Private Sub cmdfirst_Click()
rsStudent.MoveFirst
Call DisplayRecord
End Sub

Private Sub cmdprevious_Click()
rsStudent.MovePrevious
If rsStudent.BOF Then
   MsgBox ("You reach the beginning of file...")
   rsStudent.MoveFirst
End If
Call DisplayRecord
End Sub

Private Sub cmdnext_Click()
rsStudent.MoveNext
If rsStudent.EOF Then
   MsgBox ("You reach the end of file...")
   rsStudent.MoveLast
End If
Call DisplayRecord
End Sub

Private Sub cmdlast_Click()
rsStudent.MoveLast
Call DisplayRecord
End Sub

Private Sub DisplayRecord()
txtstudID.Text = rsStudent!studid
txtlname.Text = rsStudent!Lname
txtfname.Text = rsStudent!fname
txtmname.Text = rsStudent!mname
txtaddress.Text = rsStudent!address
cbobday.Value = rsStudent!bday
cboEStatus.Text = rsStudent!EStatus
cbogender.Text = rsStudent!gender
txtreligion.Text = rsStudent!religion
cboyearlevel.Text = rsStudent!yearlevel
txtsection.Text = rsStudent!Section
txtscholarship.Text = rsStudent!scholarship
txtage.Text = Int((Date - cbobday.Value) / 365)
Reply #8
08-29-11 03:20 AM
  • Full Member
  • ***
  • Male Offline
 
Posts: 1494
Thank You: 38
Reputation: 0
bobster_13 has no influence.barely matters.is working their way up.might someday be someone...is on the verge of being accepted.is a rising star!has a powerful will.is a force to reckon with.has great potential!has an aura about them.is leading the good life!is awe-inspiring!
Diba eeedit mu pa ung datasource ba yon ng textbox jan sa code mu? @acgilbert...
Reply #9
08-29-11 05:50 AM
  • Sr. Member
  • ****
  • Male Offline
 
Posts: 5293
Thank You: 135
Reputation: 2
palimos23 has no influence.barely matters.is working their way up.might someday be someone...is on the verge of being accepted.is a rising star!has a powerful will.is a force to reckon with.has great potential!has an aura about them.is leading the good life!is awe-inspiring!
Quote:
Originally Posted by : acgilbert on 08-29-11 01:58 AM
Public dbConnection As ADODB.Connection
Public rsStudent As ADODB.Recordset

' This is for the connection to your database
' call this in you form_load( how?   call dbConnect
Public Sub dbConnect()
Set dbConnection = New ADODB.Connection
dbConnection.CursorLocation = adUseClient
dbConnection.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" _
  & App.Path & "\IPADatabase.mdb;Jet OLEDB:Database;"
End Sub

Private Sub Form_Load()
Call dbConnect
'Open table for Student
Set rsStudent = New ADODB.Recordset
rsStudent.Open "Select * from Student", dbConnection, adOpenStatic, adLockOptimistic
End Sub


Private Sub cmdfirst_Click()
rsStudent.MoveFirst
Call DisplayRecord
End Sub

Private Sub cmdprevious_Click()
rsStudent.MovePrevious
If rsStudent.BOF Then
   MsgBox ("You reach the beginning of file...")
   rsStudent.MoveFirst
End If
Call DisplayRecord
End Sub

Private Sub cmdnext_Click()
rsStudent.MoveNext
If rsStudent.EOF Then
   MsgBox ("You reach the end of file...")
   rsStudent.MoveLast
End If
Call DisplayRecord
End Sub

Private Sub cmdlast_Click()
rsStudent.MoveLast
Call DisplayRecord
End Sub

Private Sub DisplayRecord()
txtstudID.Text = rsStudent!studid
txtlname.Text = rsStudent!Lname
txtfname.Text = rsStudent!fname
txtmname.Text = rsStudent!mname
txtaddress.Text = rsStudent!address
cbobday.Value = rsStudent!bday
cboEStatus.Text = rsStudent!EStatus
cbogender.Text = rsStudent!gender
txtreligion.Text = rsStudent!religion
cboyearlevel.Text = rsStudent!yearlevel
txtsection.Text = rsStudent!Section
txtscholarship.Text = rsStudent!scholarship
txtage.Text = Int((Date - cbobday.Value) / 365)
salamat po dito, log in logout delete naman
Reply #10
08-30-11 12:16 AM
  • Full Member
  • ***
  • Male Offline
 
Posts: 375
Thank You: 60
Reputation: 1
acgilbert has no influence.barely matters.is working their way up.might someday be someone...is on the verge of being accepted.is a rising star!has a powerful will.is a force to reckon with.has great potential!has an aura about them.is leading the good life!is awe-inspiring!
gawa ka na lang ng interface nito... basta ito ang para sa button to check if the username and password exist.

Private Sub cmdok_Click()
Dim dusername As String
Dim dpassword As String
Dim rsRecQuery As String
Dim rsRecord As ADODB.Recordset
dusername = UCase(Trim(txtusername.Text))
dpassword = UCase(Trim(txtpassword.Text))

Set rsRecord = New ADODB.Recordset
rsRecQuery = "Select * from login where ucase(username) = '" & dusername & "' and ucase(password) = '" & dpassword & "'"
rsRecord.Open rsRecQuery, dbConnection, adOpenStatic, adLockOptimistic
     
If rsRecord.RecordCount <> 1 Then
   MsgBox "Access Denied", vbInformation, "Security check..."
   txtusername.SetFocus
   rsRecord.Close
   Exit Sub
End If
   
rsRecord.MoveFirst
MsgBox "Access Granted! " & vbCrLf & "- - - - - - - - - - - -" & vbCrLf & vbCrLf & "W    E    L    C    O    M    E" & _
vbCrLf & "Name           : " & Trim(rsRecord!Name), vbInformation, "Security check..."
   
currentuser = Trim(rsRecord!Name)
authority = 0
rsRecord.Close
Set rsRecord = Nothing
Unload Me
Unload frmsplashscreen
MainMenu.Show
End Sub




**********
sa delete
**********
rs.delete
rs.update
Reply #11
08-30-11 06:18 AM
  • Sr. Member
  • ****
  • Male Offline
 
Posts: 5293
Thank You: 135
Reputation: 2
palimos23 has no influence.barely matters.is working their way up.might someday be someone...is on the verge of being accepted.is a rising star!has a powerful will.is a force to reckon with.has great potential!has an aura about them.is leading the good life!is awe-inspiring!
Quote:
Originally Posted by : acgilbert on 08-30-11 12:16 AM
gawa ka na lang ng interface nito... basta ito ang para sa button to check if the username and password exist.

Private Sub cmdok_Click()
Dim dusername As String
Dim dpassword As String
Dim rsRecQuery As String
Dim rsRecord As ADODB.Recordset
dusername = UCase(Trim(txtusername.Text))
dpassword = UCase(Trim(txtpassword.Text))

Set rsRecord = New ADODB.Recordset
rsRecQuery = "Select * from login where ucase(username) = '" & dusername & "' and ucase(password) = '" & dpassword & "'"
rsRecord.Open rsRecQuery, dbConnection, adOpenStatic, adLockOptimistic
     
If rsRecord.RecordCount <> 1 Then
   MsgBox "Access Denied", vbInformation, "Security check..."
   txtusername.SetFocus
   rsRecord.Close
   Exit Sub
End If
   
rsRecord.MoveFirst
MsgBox "Access Granted! " & vbCrLf & "- - - - - - - - - - - -" & vbCrLf & vbCrLf & "W    E    L    C    O    M    E" & _
vbCrLf & "Name           : " & Trim(rsRecord!Name), vbInformation, "Security check..."
   
currentuser = Trim(rsRecord!Name)
authority = 0
rsRecord.Close
Set rsRecord = Nothing
Unload Me
Unload frmsplashscreen
MainMenu.Show
End Sub




**********
sa delete
**********
rs.delete
rs.update
salamat sir,
Reply #12
01-09-13 07:49 PM
  • Full Member
  • ***
  • Male Offline
 
Posts: 1038
Thank You: 17
Reputation: 1
ZoneOne has no influence.barely matters.is working their way up.might someday be someone...is on the verge of being accepted.is a rising star!has a powerful will.is a force to reckon with.has great potential!has an aura about them.is leading the good life!is awe-inspiring!
pa help din po ako neto....   kung may sample programm na po kayo
Reply #13
03-06-13 03:56 PM
  • Newbie
  • Offline
 
Posts: 2
Thank You: 0
Reputation: 0
hueverctr has no influence.barely matters.is working their way up.might someday be someone...is on the verge of being accepted.is a rising star!has a powerful will.is a force to reckon with.has great potential!has an aura about them.is leading the good life!is awe-inspiring!
kung adodc po gusto mo.. mas madali to.. command button.  ito yung codes

Private Sub Command1_Click()
Adodc1.Recordset.AddNew

End Sub
try to run it..

mangyayari nyan...first  i click mu yung button.. at fill up all the text field (make sure lahat ng text field mo ay connected sa source MDB mo) .. tapus click mu ulit yung command button after fill up... automatic save yung mga text file sa MDB access mo..
Reply #14
03-07-13 08:57 AM
  • Full Member
  • ***
  • Male Offline
 
Posts: 897
Thank You: 336
Reputation: 3
lnoskhen has no influence.barely matters.is working their way up.might someday be someone...is on the verge of being accepted.is a rising star!has a powerful will.is a force to reckon with.has great potential!has an aura about them.is leading the good life!is awe-inspiring!
'=== ADD ===
With Adodc1.Recordset
    .MoveLast
    .AddNew
    .Fields!ID = .RecordCount + 1
    .Fields!Name = Trim(txtName.Text)
    .Fields!Age = Trim(txtAge.Text)
    .Fields!Gender = Trim(cboGender.Text)
    .Update
End With

'=== DELETE ===
With Adodc1.Recordset
    .Delete
    .Update
End With

'=== EDIT/SAVE ===
With Adodc1.Recordset
    .Fields!Name = txtName.Text
    .Fields!Age = txtAge.Text
    .Fields!Gender = cboGender.Text
    .Update
End With

'=== SEARCH ===
With Adodc1.Recordset
    .MoveFirst
    While Not .EOF
        If txtID.Text = .Fields!ID Then
            txtName.Text = .Fields!Name
            txtAge.Text = .Fields!Age
            cboGender.Text = .Fields!Gender
            Exit Sub
        Else
            .MoveNext
        End If
    Wend
    MsgBox "Record not Found!"
End With

'=== LOG IN ===
With Adodc1.Recordset
    While Not .EOF
        If txtUsername.Text = .Fields!Username and txtPassword.Text = .Fields!Password Then
            Form2.Show
            Exit Sub
        Else
            .MoveNext
        End If
    Wend
    MsgBox "Invalid Username or Password!"
End With
Pages: [1]   Go Up
 



All dates are GMT+8:00. The date now is 05-25-13 02:20 PM
WWW.PINOYDEN.COM.PH does not store any files on it's server, we are just indexing other sites contents!
WWW.PINOYDEN.COM.PH [Ang Tambayan ng pinoy!] copyright 2008-2009 All Rights Reserved.
Contents published on www.PinoyDen.com.ph requires permission for reprint.

Page created in 0.198 seconds with 22 queries.