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 returns -4, incorrect username / password 1

Status
Not open for further replies.

insania

Technical User
Feb 11, 2004
53
IE
Hi,

One of our users is using the following code to connect to their Goldmine 6 database:


* Declare GoldMine functions
DECLARE INTEGER GMW_UnloadBDE IN GM6S32

DECLARE INTEGER GMW_SetSQLUserPass IN GM6S32;
STRING szSQLUserName,;
STRING szSQLPassword

DECLARE INTEGER GMW_LoadBDE IN GM6S32;
STRING szSysDir,;
STRING szGoldDir,;
STRING szCommonDir,;
STRING szUser,;
STRING szPassword

DECLARE INTEGER GMW_DS_Close IN GM6S32;
INTEGER iHandle

* Set SQL password
z_result = GMW_SetSQLUserPass(z_SQLUser,z_SQLPassword)

* Load the BDE
z_result = GMW_LoadBDE(z_SysDir,z_GoldDir,z_CommonDir,z_GMUser,z_GMPassword)



The code is using the following values:

z_SysDir = g:\
z_GoldDir = MSSQL:prestige_sql:DBO:
z_CommonDir = MSSQL:prestige:dbo:

The values that are returned by DDEREQUEST are as above except that z_GoldDir and z_CommonDir are returned with a final character of "." instead of ":". The fullstop seemed to be causing a problem that was resolved by using a colon...

The user has set up a user in Goldmine with the same username and password as is used to log onto the SQL Server, so 'z_GMUser' is identical to 'z_SQLUser' and 'z_GMPassword' is identical to 'z_SQLPassword'.

GMW_SetSQLUserPass returns 1, indicating that it has run successfully, but GMW_LoadBDE returns -4 suggesting that either the username or password is incorrect. I am not sure which username / password this relates to so I have carried out the following tests:

The user has successfully logged onto Goldmine using z_GMUser and z_GMPassword, suggesting that there is nothing wrong with that username/password combination, and I can successfully connect using the following code:

lcDSNLess = "Driver={SQL Server};Server = Bgr-Apps; Uid=z_SQLUser; Pwd=z_SQLPassword"

gnConnHandle = SQLSTRINGCONNECT(lcDSNLess)

This would seem to suggest that there is nothing wrong with the SQL Server username and password.

All the documentation I have got relates to GM5S32 rather than GM6, and I am just applying the same principles. The above code will work fine when connecting to a dBase database, so I'm guessing that it is something I'm doing wrong from an SQL Server point of view. Is there something I am missing in terms of the code? If not, is there anything that the user can change in terms of their setup that will resolve the issue?

Any help is greatly appreciated.

Jake
 
Give the Users user group Write rights to the g:\ folder and all sub folders.

By the way, you usually put the share one level up from the GoldMine directory, meaning your path would be g:\goldmine

The Wizard
Home of IW Extreme - the CRM that works on the Internet and in Windows at the same time
 
I've just checked with the user and the users are set up with write permissions, including on the sub folders...

Jake
 
Jake,

z_SysDir = g:\
z_GoldDir = MSSQL:prestige_sql:DBO:
z_CommonDir = MSSQL:prestige:dbo:

Is wrong, it should have spaces:

z_SysDir = g:\
z_GoldDir = MSSQL: prestige_sql: DBO:
z_CommonDir = MSSQL: prestige: dbo:


and are you sure the z_commondir shouldnt be prestige_sql?

Also make sure the username & password are past in upper case.

Regards,

Richard.
PRIOR Analytics UK
Winners of the LBA Customer Service Award.
 
Many thanks, Richard - the username and password needed to be in upper case.

The lack of spaces doesn't seem to be causing a problem in this instance.

Jake
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top