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!

GMW_LoadBDE problem... 1

Status
Not open for further replies.

ocdaan

Programmer
Feb 23, 2004
4
NL
Hi,

When I try to load the BDE in VB, I get the following error message:

"Cannot find license file"

I think that the 'connection string' is ok, otherwise it would generate an other error. But I don't have any idea to be honest.

Anyone an idea? Thanks in advance !!

 
To fix this problem make sure your username and passwords are correct, either for goldmine and or sql(if your using this)

This will fix your problem, well it was a problem I had and this fixed it. Also make sure your .lic file is in the root of goldmine.
 
Thanx for your replay Dalik, but I can't get it to work, very frustrating.

You mean by the ".lic file" the License.DBF file?

I get confused by the difference between the connection to the databases. If I understand correctly you can choose between BDE and SQL. I use a MS SQL Server 2000.

In the goldmine root dir there is the License.DBF. This is the correct path to the SysDir I guess. (both BDE and SQL?)

The GoldDir has to point to the Cal.DBF. But in case of me (using SQL Server) I have to point to the SQL Server I think (where is also a Call tabel). So it will be "GoldMine_Sales: dbo."

And for the CommonDir the same story > it has to point to the Contact1.DBF > "GoldMine_Sales: dbo." in my case.

Or is my way of thinking wrongly?

When I retrieve the basic GoldMine paths I think i fill in the right paths and username:

sGM_Sysdir = .DDERequest("&sysdir")
(value = d:\program files\goldmine\)

sGM_GoldDir = .DDERequest("&golddir")
(value = MSSQL: GoldMine_Sales: dbo.)

sGM_Commondir = .DDERequest("&commondir")
(value = MSSQL: GoldMine_Sales: dbo.)

sGM_Username = .DDERequest("&username")
(value = MASTER)

The stangest thing is that for example the ".DDERequest("&commondir")" returns "MSSQL: GoldMine_Sales: dbo." but the actual database name = GoldMine_Sales_And_Marketing.

I'm completely lost here..... ;-( I have tryd every combination... First one is correct I yu ask me... but is doesn't....

lResult = GMW_LoadBDE("GoldMine_Sales: dbo.", "GoldMine_Sales: dbo.", "GoldMine_Sales: dbo.", "MASTER", "ACCESS")

'lResult = GMW_LoadBDE("d:\Program Files\GoldMine\", "GoldMine_Sales: dbo.", "GoldMine_Sales: dbo.", "DAAN", "ZAQ")

'lResult = GMW_LoadBDE("\\dayen\goldmine\License.DBF", "GoldMine_Sales_And_Marketing: dbo.CAL", "GoldMine_Sales_And_Marketing: dbo.CONTACT1", "MASTER", "ACCESS")

'lResult = GMW_LoadBDE("\\dayen\goldmine", "\\dayen\goldmine\GMBase", "\\dayen\goldmine\Common", "MASTER", "ACCESS")

'lResult = GMW_LoadBDE("GoldMine_Sales: dbo.", "GoldMine_Sales: dbo.", "GoldMine_Sales: dbo.", "sa", "12222222")

And where do I logon to the SQL Database? Not with the GMW_LoadBDE function I think, there you give the GoldMine username and passw. At what point does this happen?

If I could get an answer to all off this I would be a happy man ;-) I know it's a lot of text but had no idea how else to make my point clear.

Thanx.....
 
Made a small mistake in the previous post:

This is the right string for loading the BDE I think:

lResult = GMW_LoadBDE("d:\program files\goldmine\", "GoldMine_Sales: dbo.", "GoldMine_Sales: dbo.", "MASTER", "ACCESS")
 
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
 
Hey guys,

I'm sorry that I didn't respond for a while, thats because it wouldn't work and I got pretty frustrating about it. The first error message I encounterd was "Cannot find license file" and after a few weeks of stuggling the last error message I saw was "Cannot find license file". In the meanwhile I thought I understanded the theorie behind it, but still can't get it to work.

Aaargghhh ;-)

Daan.

(And again, thanx for the help....)
 
If it cannot find the license.dbf, then the Sysdir location is incorrect OR you don't have rights to it

You posted:

lResult = GMW_LoadBDE("d:\program files\goldmine\", "GoldMine_Sales: dbo.", "GoldMine_Sales: dbo.", "MASTER", "ACCESS")

This means that you don't have a license.dbf in d:\program files\goldmine\, or your Users user in windows doesn't have rights to the folder.

If this is Windows XP, and I am guessing it is, then you want to run GM from someplace other than program files. Also, if you installed from the CD in XP, your GoldMIne is likely in your My Documents area and there is just a shortcut to it in program files

The Wizard
Home of Link Magic and Web Magik
 
have you checked the sharedmemlocation in your BDE's system|Init settings? If it's 7000, that might be your whole issue after all this stuff.. Try 4000, 6000, 6BDE, etc..



Doug Castell
Computer Control Corp
(310)396-6811
 
I'm having this same problem but I'm getting a -4 error on the BDEload "cannot validate license". Did you ever get yours to work? I've gone through all the suggestions including using the DDE to get the arguments ect. Help!!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top