Alright here parts of my code that is working, you need to do some things in the right order, so if your working with sql which you are then this is what you need to do. Also remember to debug your app which I am sure you are.
===========================================================
SysDir = .DDERequest("&SysDir"

GoldDir = .DDERequest("&GoldDir"

CommonDir = .DDERequest("&CommonDir"

sLogin = .DDERequest("[GetLoginCredentials]"

===========================================================
I am reading in the values from a config file for these two values: sqluser and sqlpass, these values is set with the database in enterprise manager.
===========================================================
lResult = GMW_SetSQLUserPass(SqlUser, SqlPass)
===========================================================
these are my database locations, the ':' doesnt really matter, I believe GM puts a '.' at the end dont stress just use what the .DDE returns to you.
MSSQL: GMSM_Contacts: dbo:
MSSQL: GMSM_GMBase: dbo:
Make sure you have a MASTER/ACCESS user in gm or use a uname and pass that GM will accept
===========================================================
lResult = GMW_LoadBDE(SysDir, _
GoldDir, CommonDir, "MASTER", "ACCESS"

===========================================================
Here we are opening a database table. With the goldmine api, it tries for the most part hide how GM is talking to the data, this is very important so you dont kill yourself. GM tries to make it very easy for you to read and write data.
===========================================================
' Open contact2 table
lHandle2 = GMW_DB_Open("Contact2"

If lHandle2 = 0 Then
MsgBox ("Failed to open database."

Unload Me
End If
===========================================================
Just checking if what he opened is a sql table or a dbase file, in your case sql.
==========================================================='check to see if we are in sql or xbase
lResult = GMW_DB_IsSQL(lHandle2)
If lResult = 0 Then
MsgBox ("Opened non-sql file, closing."

Unload Me
End If
===========================================================
we must close our connection
===========================================================
lResult = GMW_DB_Close(lHandle2)
If lResult = 0 Then
MsgBox ("Failed to close connection with sql."

End If
===========================================================
Unload the resources
===========================================================
lResult = GMW_UnloadBDE
If lResult = 0 Then
MsgBox ("Failed to close database"

End If
===========================================================
About the lic file, just make sure you have one in the root dir, if your able to open GM and log in then you should be fine. Just make sure you have a basic framework for your program.
-log in to sql
-login to gm //load_bde function
-do logic
-close connection
-unload bde
David