Subversion Repository Public Repository

ConnectionOdbcSdk

Diff Revisions 11 vs 12 for /trunk/ConnectionServer/ConnectionServerOdbc.cs

Diff revisions: vs.
  @@ -366,64 +366,6 @@
366 366 }
367 367 }
368 368
369 -
370 -
371 - /// <summary>
372 - /// if there's a login failure via ODBC process the error information we get back from the Informix ODBC driver.
373 - /// there's some common failure reasons that we can dig out and warn about in a friendly mannor - if it's something else
374 - /// just pass through what the ODBC driver raises.
375 - /// </summary>
376 - public string GetLoginErrorString(System.Data.Odbc.OdbcException ex)
377 - {
378 - if (ex == null)
379 - {
380 - return "";
381 - }
382 -
383 - string strErrorText = "The login attempt to " + DatabaseServerName + " failed." + "\n" + "\n";
384 -
385 - //check system errors returned by Informix - there's a couple of common ones users trip up on a lot.
386 - if (ex.Errors.Count > 0)
387 - {
388 - switch (ex.Errors[0].NativeError)
389 - {
390 - case -908:
391 - strErrorText += "System error -908 This usually means the server is not found or that the ODBC Proxy is not enabled or cannot be reached"
392 - + " on port 20532. Make sure that port is not being blocked, that the database proxy service is currently active and running"
393 - + " and that the server name can be resolved properly from this Windows machine." + "\n";
394 - break;
395 - case -930:
396 - strErrorText += "System error -930 This usually means the server is not found. Make sure that the server name can be resolved properly from"
397 - + " this Windows machine." + "\n";
398 - break;
399 - case -11048:
400 - strErrorText += "System error -11048 This usually means the ODBC driver is not installed properly or it can sometimes mean the PATH environment"
401 - + " variable is too long - try moving the INFORMIXDIR/bin reference to the beginning of the PATH." + "\n";
402 - break;
403 - case -27001:
404 - strErrorText += "System error -27001 This usually means the user name or password are wrong or that they correspond to a user that does not have"
405 - + " the Remote Database Access role assigned to them or that the user\'s password has expired or is set to require a reset at next"
406 - + " login or the account has been locked." + "\n";
407 - break;
408 - default:
409 - strErrorText += "Error retrned from ODBC Driver=" + ex.Message + "\n";
410 - break;
411 - }
412 - }
413 - else
414 - {
415 - strErrorText += "Error retrned from ODBC Driver=" + ex.Message + "\n";
416 - }
417 -
418 - //store the error in the last error slot so the calling party can decide what to do with it - show it as a tool tip in the grid,
419 - //throw a message box up, passively show it in a status in the toolbar etc...
420 - strErrorText += "\n" + "Make sure Connection has been properly configured to allow for remote logins. See the \'Troubleshooting Tips\' " +
421 - "section in the help file for more details on this and other potential issues that could cause connection failures.";
422 -
423 - return strErrorText;
424 -
425 - }
426 -
427 369 /// <summary>
428 370 /// Disconnect from the database - this is used when failing to log into a server because the version is too old - allows for a clean
429 371 /// connection to another server with a newer version without having to exit and restart.