Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2003
    Posts
    3

    Unanswered: VB6 caused invalid page fault in module MSXBSE35.DLL

    Sure could use some help!

    I am experiencing random and very frustrating crashes accessing a Foxpro 2.5 database using VB6 DAO. The problem/crash is reported as…

    "VB6 caused invalid page fault in module MSXBSE35.DLL".

    sometimes I also get...

    "VB6 caused invalid page fault in module KERNEL32.DLL".

    The crashes occur while using the executable program as well as in the programming environment. They occur when the database tables are located on a server or locally on the workstation.

    I've tried everything I can think of, yes even the MSN support database. Here’s a few things I have tried.

    1.Tried using every DAO reference available to me. 2.5/3.0, 2.5/3.1, 3.0 & 3.51. Maybe fewer crashes with 2.5/3.0 but still problems. Note: once a crash occurs they become much more frequent until I re-boot.
    2.Made sure I close all Recordsets and Databases (Rs.Close, Db.Close) within the Procedure. Have also tried setting database to nothing (Set Db = Nothing)
    3.If I copy the Foxpro DBF tables to the local drive, remove the index files (CDX) and the INF files I get a very stable program. Unfortunately, this is not a practical solution since the database is used by other programs that require the indexes.

    Here’s how I access the database…

    Dim Db As Database
    Dim Sh As Recordset
    Dim SQLQ As String

    Set Db = DBEngine.Workspaces(0).OpenDatabase(Trim$(Local_Da tabasePath), False, True, "Foxpro 2.5;")

    SQLQ = <string query>

    Set Sh = Db.OpenRecordset(SQLQ, dbOpenSnapshot) 'or dbOpenDynaset

    I’ve started trying to convert everything to ADO but found that many of my queries are not compatible so would sure like to stay with DAO.

    I would appreciate any suggestions. Sorry for the long question.
    Thanks.

  2. #2
    Join Date
    Nov 2002
    Location
    Ohio
    Posts
    90
    Hi garyh,

    It sounds like you've got a memory "leak" somewhere in your application. I'm basing this on the fact the application crashes more frequently until you reboot the PC.

    Locating these is a beast!

    You can turn on the system resource monitor, watch the usage as you exercise different parts of the aplication repeatedly.

    I'd be looking for: Object created without being deleted, open ended queries that return large amounts of data, internal tables that may grow too large, etc.

    Good Luck,
    Bruce Baasch

  3. #3
    Join Date
    May 2003
    Location
    brazil
    Posts
    1

    Question Re: VB6 caused invalid page fault in module MSXBSE35.DLL

    Gary,

    I too have this problem with VB 5. Do you resolved ?

    Thanks,

    Antony, Brazil SP


    Originally posted by garyh
    Sure could use some help!

    I am experiencing random and very frustrating crashes accessing a Foxpro 2.5 database using VB6 DAO. The problem/crash is reported as…

    "VB6 caused invalid page fault in module MSXBSE35.DLL".

    sometimes I also get...

    "VB6 caused invalid page fault in module KERNEL32.DLL".

    The crashes occur while using the executable program as well as in the programming environment. They occur when the database tables are located on a server or locally on the workstation.

    I've tried everything I can think of, yes even the MSN support database. Here’s a few things I have tried.

    1.Tried using every DAO reference available to me. 2.5/3.0, 2.5/3.1, 3.0 & 3.51. Maybe fewer crashes with 2.5/3.0 but still problems. Note: once a crash occurs they become much more frequent until I re-boot.
    2.Made sure I close all Recordsets and Databases (Rs.Close, Db.Close) within the Procedure. Have also tried setting database to nothing (Set Db = Nothing)
    3.If I copy the Foxpro DBF tables to the local drive, remove the index files (CDX) and the INF files I get a very stable program. Unfortunately, this is not a practical solution since the database is used by other programs that require the indexes.

    Here’s how I access the database…

    Dim Db As Database
    Dim Sh As Recordset
    Dim SQLQ As String

    Set Db = DBEngine.Workspaces(0).OpenDatabase(Trim$(Local_Da tabasePath), False, True, "Foxpro 2.5;")

    SQLQ = <string query>

    Set Sh = Db.OpenRecordset(SQLQ, dbOpenSnapshot) 'or dbOpenDynaset

    I’ve started trying to convert everything to ADO but found that many of my queries are not compatible so would sure like to stay with DAO.

    I would appreciate any suggestions. Sorry for the long question.
    Thanks.

  4. #4
    Join Date
    Jan 2004
    Posts
    1

    No database crashes as of yet

    Here is the way i use the DAO for data access, and so far have had no problems.

    Private Sub cmdCPT_Click()
    Dim dbCPT As Database
    Dim rsCPT As DAO.Recordset
    Dim getCode As String
    Dim CPTSQL As String

    getCode = InputBox("Enter Code:", "Description by Code")

    CPTSQL = "SELECT AllCodes.ID, AllCodes.Code, AllCodes.Full " & _
    "From AllCodes " & _
    "Where (AllCodes.Code) LIKE " & Chr(34) & getCode & "*" & Chr(34) & " " & _
    "ORDER BY AllCodes.Code;"

    Set dbCPT = OpenDatabase(App.Path & "\FoxLinks.mdb")
    Set rsCPT = dbCPT.OpenRecordset(CPTSQL, dbOpenDynaset)

    With rsCPT
    On Error GoTo NoCode
    RTB1.Text = !FULL
    MsgBox "Code " & !Code & " was found with the following description:" & vbCrLf & vbCrLf & !FULL
    DiagCd.Text = !Code
    End With

    Exit Sub

    NoCode:
    RTB1.Text = ""
    MsgBox "Code Not Found !"

    End Sub


    I use access with linked tables or I pre-process using a macro to import the foxpro data into a new access table then query the new table and delete it when i'm done... foxpro acts a little flaky sometimes... and i'm using old 2.0 tables... i can't even upgrade it to 2.5 or it would have been re-written in VisualFox.

    If you want to know how to run an access marco script from within the VB exe.... here is what i do:

    Call Shell("msaccess " & Chr(34) & App.Path & "\FoxLinks.mdb" & Chr(34) & " /x NewProv", vbMaximizedFocus)

    The "/x macroname" is the key.... so i creat a macro in Access to create a temp table of my foxpro data or to run a query and then i process as above.

    Not sure if it will help but it works for me.
    Last edited by PhybrOptk; 01-30-04 at 17:43.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •