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 = MSSQLrestige_sqlBO:
z_CommonDir = MSSQLrestige: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
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 = MSSQLrestige_sqlBO:
z_CommonDir = MSSQLrestige: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