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() problems

Status
Not open for further replies.

Dalik

Programmer
Feb 6, 2004
9
US
Ok I am working on my 2nd program for goldmine, and I dont have the lastest, working code as I had before, so I cant just change a few things but here is my problem

I am trying to use this wonderful function and I am getting a -5 ( invalid goldDir ) Now I am using DDE to get the xDir path values, for the sys, gold, and common dir's.

I am connecting to sql and everything seems to be in order on that side of things. Here is the line of code that is in question.

lResult = GMW_LoadBDE(SysDir, GoldDir, CommonDir, "MASTER", "ACCESS")

SysDir = "c:\apps\goldmine"
GoldDir = "MSSQL: GMSM_GMBase: dbo."
CommonDir = "MSSQL: GMSM_Contacts: dbo."

and I get a return -5

GMSM_Contacts has the Contact1 table
GMSM_GMBase has the CAL table (which is correct I believe) that goldmine is looking for.

I am sure everything else will work once I get past this point. I am using goldmine 6, vb6 and sql 2000

I cut all the code that isnt needed to find what the problem is so my only function call is this one above. I am using the frmDDE form, with this and it seems to be working fine.
 
Hi,

It reckons it cant find the GMBase location. Check the BDE settings for GMSM_GMBASE

Also you if your running a single database then they should use the same alias.

Regards,

Richard.
 
Thank you for the reply, but I am still having the same problem

I have checked the BDE and I am able to connect to the database through BDE, and the Databse Name in the config section for the alias is
DATABASE NAME = GMSM_GMBase
This is the same name for the SQL database.

For the connection string to the database should it be
MSSQL: GMSM_GMBase: dbo:
where goldmine returns
MSSQL: GMSM_GMBase: dbo.
^
^ marks the only difference.

also in the code do I have to setup the SQL login details before I call the GMW_LoadBDE() function? Or can I do this after I call the LoadBDE() function?

If you have any more ideas let me know, Thank you.
 
Ok I fixed the problem, and here is what I should have done, RTFM a bit better, I didnt have the GMW_SetSQLUserPass() before the GWM_LoadBDE() function call, so thats how you fix that. But I am having another problem. I have my sql database opened in goldmine and when I get to this function GMW_DB_IsSQL() I get a returned value of 0, which means an non-sql database has/is open. Now I though whatever is opened in goldmine, should be valued through the function calls which I am sure it is but I have over looked something. If anyone has any ideas let me know, but I will keep at this.

Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top