8 Replies - 1519 Views - Last Post: 12 March 2012 - 10:10 AM Rate Topic: -----

#1 christian_17  Icon User is offline

  • New D.I.C Head

Reputation: -2
  • View blog
  • Posts: 16
  • Joined: 28-March 11

Unrecognized database format in VB6 help.

Posted 09 March 2012 - 09:01 PM

Hello everyone i just want to ask something i have a access 95 and i cant edit the field because its read only when i convert it and change to 2000 or 2003 it says format not recognized format or invalid database format...how can i change this in to other database format ...im using windows 7 and have a MS2010 in my laptop.. can anyone help me with this problem...

Thank you..

clarification when i run it into vb6 after the converted it say invalid or not recognized database format..

Is This A Good Question/Topic? 0
  • +

Replies To: Unrecognized database format in VB6 help.

#2 maj3091  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 271
  • View blog
  • Posts: 1,633
  • Joined: 26-March 09

Re: Unrecognized database format in VB6 help.

Posted 10 March 2012 - 12:15 AM

Please can you post the code where you try to open the database or at least explain how you're trying to open it (ADO, DAO, Controls).

Are you running latest service packs in VB6?

A quick google search throws up multiple suggestions.
Was This Post Helpful? 0
  • +
  • -

#3 christian_17  Icon User is offline

  • New D.I.C Head

Reputation: -2
  • View blog
  • Posts: 16
  • Joined: 28-March 11

Re: Unrecognized database format in VB6 help.

Posted 10 March 2012 - 02:25 AM

here is the code in login form when i run it show unrecognized database format because my databse format is access 95 how can i change the format..i dont know if the the condition is in the code or in the access database..

I dont think if i m using the latest latest service pack ...can i ask what is the latest service pack in vb? and if you have can you please share it to me thank you in advance..hope somebody will help me..

Private Sub cmdLogin_Click()

    Dim found As Boolean
    Dim instructor As Boolean
    
    'reset found flag to false
    found = False
    
    'check for blank login fields
    
    
    'search userID to see if it exists
    datLogin.Recordset.MoveFirst
    userCode = datLogin.Recordset.Fields("UserID").Value
    Do Until found Or datLogin.Recordset.EOF
        userCode = datLogin.Recordset.Fields("UserID").Value
        If UCase(RTrim(userCode)) = UCase(txtUserID.Text) Then
            found = True
            Exit Do
        Else
            datLogin.Recordset.MoveNext
        End If
    Loop
        
    If found Then
        'check password if found
        password = datLogin.Recordset.Fields("Password").Value
        instructor = datLogin.Recordset.Fields("Instructor").Value
        If UCase(password) = UCase(txtPassword.Text) Then
            'load appropiate form for student or instructor
            loggedUser = UCase(userCode)
            If instructor Then
                Load frmInstructor
            Else
                Load frmStudent
            End If
        Else
            MsgBox "Password is incorrect!", , "Warning!!"
        End If
    Else
        MsgBox "User ID was not found, try again.", , "Warning!"
        
    End If
                
End Sub

Private Sub Form_Load()
    
    'center form on screen
    frmLogin.Left = (Screen.Width - Width) / 2
    frmLogin.Top = (Screen.Height - Height) / 2
    'set color for login screen
    r = 204
    g = 195
    b = 175
    BackColor = RGB(r, g, B)/>
    cmdLogin.BackColor = RGB(r, g, B)/>
    cmdExit.BackColor = RGB(r, g, B)/>
    
    With datLogin
        .DatabaseName = App.Path & "\login.mdb"
        .RecordSource = "Login"
        .Refresh
    End With
    
End Sub

Was This Post Helpful? 0
  • +
  • -

#4 maj3091  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 271
  • View blog
  • Posts: 1,633
  • Joined: 26-March 09

Re: Unrecognized database format in VB6 help.

Posted 10 March 2012 - 04:57 AM

latest service pack is 6 and you can find it using google (it's a free download from MS).

What is datLogin?

Slightly confused what you're after. Do you want to open and work with the 95 DB or not?

Here's a couple of links regarding data access using controls and ADO, might be worth a read.

Link1
Link2
Was This Post Helpful? 0
  • +
  • -

#5 christian_17  Icon User is offline

  • New D.I.C Head

Reputation: -2
  • View blog
  • Posts: 16
  • Joined: 28-March 11

Re: Unrecognized database format in VB6 help.

Posted 11 March 2012 - 05:11 AM

View Postmaj3091, on 10 March 2012 - 04:57 AM, said:

latest service pack is 6 and you can find it using google (it's a free download from MS).

What is datLogin?

Slightly confused what you're after. Do you want to open and work with the 95 DB or not?

Here's a couple of links regarding data access using controls and ADO, might be worth a read.

Link1
Link2


my main problem is unrecognized database format how can i change it by other database format without error help me please
Was This Post Helpful? 0
  • +
  • -

#6 maj3091  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 271
  • View blog
  • Posts: 1,633
  • Joined: 26-March 09

Re: Unrecognized database format in VB6 help.

Posted 11 March 2012 - 12:40 PM

You should be able to read it into Access Version X and save it as the version you want.

Have a look at this link.
Was This Post Helpful? 0
  • +
  • -

#7 christian_17  Icon User is offline

  • New D.I.C Head

Reputation: -2
  • View blog
  • Posts: 16
  • Joined: 28-March 11

Re: Unrecognized database format in VB6 help.

Posted 11 March 2012 - 08:35 PM

View Postmaj3091, on 11 March 2012 - 12:40 PM, said:

You should be able to read it into Access Version X and save it as the version you want.

Have a look at this link.


when i done doing that process replace the database into new database format but..it always prompt unrecognized format..i know how to convert but to change the original to the new thats the thing that i dont know?? i dont know if access 95 only are the who read by vb6.
Was This Post Helpful? 0
  • +
  • -

#8 maj3091  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 271
  • View blog
  • Posts: 1,633
  • Joined: 26-March 09

Re: Unrecognized database format in VB6 help.

Posted 12 March 2012 - 01:07 AM

If you had taken the time to read the links I posted earlier, you would see that VB can work with other versions of access, not just 95.
Was This Post Helpful? 1
  • +
  • -

#9 raziel_  Icon User is offline

  • Like a lollipop
  • member icon

Reputation: 458
  • View blog
  • Posts: 4,222
  • Joined: 25-March 09

Re: Unrecognized database format in VB6 help.

Posted 12 March 2012 - 10:10 AM

this can also appear if your DB is corrupted. can you open it normally using access? if you want to use old db format and you can open it with access just save it as some old db format like .mdb.

This post has been edited by raziel_: 12 March 2012 - 10:11 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1