Welcome to Dream.In.Code
Become a VB Expert!

Join 149,973 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 1,403 people online right now. Registration is fast and FREE... Join Now!




THE LOGIN PAGE COMPLETED - halluzineyt

 
Reply to this topicStart new topic

THE LOGIN PAGE COMPLETED - halluzineyt, vb6 database with password

halluzineyt
4 Jan, 2008 - 03:37 AM
Post #1

New D.I.C Head
*

Joined: 2 Jan, 2008
Posts: 10

masters!!! i have made alterations on my program on VB6 and i have found out that i just have a litle conflict on my ado setting and it worked how i want it to be

i just want to ASK what will i add to my login page code so that it will become case sensitive

.heres my code for the login page
CODE

Private Sub cmdOk_Click()
Dim db_file As String
Dim statement As String
Dim conn As ADODB.Connection
Dim rs As ADODB.Recordset

    ' Open the database.
    db_file = App.Path
    If Right$(db_file, 1) <> "\" Then db_file = db_file & _
        "\"
    db_file = db_file & "data.mdb"

    ' Open a connection.
    Set conn = New ADODB.Connection
    conn.ConnectionString = _
        "Provider=Microsoft.Jet.OLEDB.4.0;" & _
        "Data Source=" & db_file & ";" & _
        "Persist Security Info=False"
    conn.Open

    ' Look up the user name/password.
    statement = "SELECT COUNT (*) FROM Users WHERE " & _
        "UserName='" & Replace(txtUserName.Text, "'", "''") _
            & "' AND " & _
        "Password='" & Replace(txtPassword.Text, "'", "''") _
            & "'"
    Set rs = conn.Execute(statement)

    ' See if we got anything.
    If CLng(rs.Fields(0)) < 1 Then
        ' There is no match.
        ' Do not allow the login.
        Unload Me
        MsgBox "Invalid user name/password."
    Else
        ' There is a match.
        ' Display the program's main form.
        Form1.Show
        Unload Me
    End If

    rs.Close
    conn.Close
End Sub



and also i want to ask if how will i be able to run my own created database on acess.. is it possible?? beside biblio.mdb that is included on my vb package???

i fixed it up in the connection property it succeded in the test connection but after i Run the whole program it cant read the database i connected within it..

files made from mic.acess 1997 are the ones running on my ado .. can i configure my own and make a new database with a new versions of m.acess??

User is offlineProfile CardPM
+Quote Post

Amadeus
RE: THE LOGIN PAGE COMPLETED - Halluzineyt
4 Jan, 2008 - 08:05 AM
Post #2

g++ -o drink whiskey.cpp
Group Icon

Joined: 12 Jul, 2002
Posts: 12,355



Thanked: 51 times
Dream Kudos: 25
My Contributions
QUOTE(halluzineyt @ 4 Jan, 2008 - 06:37 AM) *



i just want to ASK what will i add to my login page code so that it will become case sensitive

What would you like to be case sensitive? Can you describe the appropriate situation?
QUOTE

and also i want to ask if how will i be able to run my own created database on acess.. is it possible?? beside biblio.mdb that is included on my vb package???

Yes, you can create your own db in access and use it with a VB application.
QUOTE

i fixed it up in the connection property it succeded in the test connection but after i Run the whole program it cant read the database i connected within it..

What was the error?
QUOTE

files made from mic.acess 1997 are the ones running on my ado .. can i configure my own and make a new database with a new versions of m.acess??

Yes, although you may have to update the connection string if a different Provider is used.
User is online!Profile CardPM
+Quote Post

halluzineyt
RE: THE LOGIN PAGE COMPLETED - Halluzineyt
5 Jan, 2008 - 04:52 AM
Post #3

New D.I.C Head
*

Joined: 2 Jan, 2008
Posts: 10

The password.. iwant it to be case sens. like when i enterd jay on the database , the on the login menu i typed Jay whit a big letter still it entered . which i dont really want to be happening..

about the connection i mean my program cant detect the database made recently it shows on the setup but when i test connect it error comes in.
while the other database created on 1997 is working just right with the use of ado .
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/8/09 06:40PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month