cancel
Showing results for 
Search instead for 
Did you mean: 

DatabaseController.SetTableLocationEx throws Logon failed

patrick_simons2
Participant
0 Kudos

Hi,

We run across a strange behavior with SetTableLocationEx which returned the following error:

"[Code du fournisseur de la base de données : -2147217887 ] Erreur dans le fichier xxx.rpt : Connexion impossible : les paramètres de connexion sont incorrects."
in English "Logon Failed. Error in File xxx.rpt: Unable to connect: incorrect log on parameters."

This problem occurred on one PC, but not on another one!

While analyzing the problem I tried to start a Verify Database in CR Designer (2011); here the same behavior, the Verify worked on one PC but not on another one:

On a Windows 10 PC it worked, but not on Windows 7 or 8.1. After further research, we found out that the Locale Identifier on one table was the problem:

The normal Locale ID we use is "German (Luxemburg)" = 4103, but 3072 is a new Windows 10 Locale for "German (Belgium)" which does not exists on Windows 7 or 8.

see also: Microsoft Locale ID Values

It would be great if an exception on SetTableLocationExcould could point on to the problem to the Locale ID in this case.

Thanks,

Patrick

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi David,

CR does not "fix or suggest how to fix" DB client or DB Server issues. To do something like that would be a huge amount of work to write in and maintain, we have no control over what DB Server/Clients can do or how they work or when they change etc. All we can do is pass along the message from the Client, if it doesn't report specific details we can't pass them along to you.

I suggest you post an enhancement request to the dB makers to auto-adjust the language settings for each OS.

See if the Inner Exception in your app would be able to capture the same error as CRD is reporting.

Something like this:

catch (Exception ex)
{
if (ex.Message.ToString() == "Object reference not set to an instance of an object.")
MessageBox.Show("ERROR: Object reference not set to an instance of an object.");
else
if (ex.Message.ToString() == "External component has thrown an exception.")
{
MessageBox.Show("ERROR: External component has thrown an exception.");
}
else
{
{
if (ex.InnerException.Message != null)
{
MessageBox.Show("ERROR: " + ex.Message + " ;" + ex.InnerException.Message);

////cool but of no use to release mode
//string myURL = @"http://search.sap.com/ui/scn#query=" + ex.InnerException.Message + "&startindex=1&filter=scm_a_site%28scm_v_Site11%29&filter=scm_a_modDate%28*%29&timeScope=all";
//string fixedString = myURL.Replace(" ", "%20");

////System.Diagnostics.Process.Start(@"C:\Program Files (x86)\Internet Explorer\iexplore.exe", myURL);
//System.Diagnostics.Process.Start(@"C:\Program Files (x86)\Mozilla Firefox\firefox.exe", fixedString);

////string myURL = @"C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports 2011\Help\en\crw.chm";
////System.Diagnostics.Process.Start(myURL);
////cool but of no use to release mode

}
else
{
MessageBox.Show("ERROR: " + ex.Message);
}
}
}

Don

Answers (0)