Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

API crash (GMW_DB_Open) from Visual Basic

Status
Not open for further replies.

LastToKnow0

Programmer
Aug 13, 2003
1
US
Whenever I call GMW_DB_Open, I get an invalid page fault in GM6S32.DLL, followed by an invalid page fault in SSSCC.DLL.

Code:
Public Declare Function GMW_DB_Open Lib "GM6S32.dll" (ByVal sTableName As String) As Long
Public Declare Function GMW_DB_Close Lib "GM6S32.dll" (ByVal lArea As Long) As Long

Private Sub Form_Load()

    Dim lWorkArea As Long
    
    
    lWorkArea = GMW_DB_Open("CONTACT1") 'crash here, execution halts
    GMW_DB_Close lWorkArea 
        
    End
End Sub
Am I screwing up the call or something? I can call most other functions alright, but I need to open the database before I can actually use them.

I'm running visual basic 6 SP5 on a win98 box.
 
I have had the same problem.
Make sure you are connecting to the BDE before trying to issue the GMW_DB_Open method.
-=RL=-
 
You are opening the Contact1 Table before you log in to Borland.

This is a common mistake. You have to:

1. Log into SQL
2. Log into Borland
3. Open the Work Area

I have a module for all of this that you can download from my web site

The Wizard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top