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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Windows in French - The format of the input string is incorrect.(the size of the string is invalid)

Status
Not open for further replies.

nztankgirl

Programmer
Apr 22, 2010
10
0
0
NZ
Hi,

I'm getting the following error on a machine which is running Windows in French when trying to run the below function.
Le format de la chaîne d'entrée est incorrect. (the format of string is invalid)
[The format of the input string is incorrect. (the size of string is invalid)]

The error seems to occur just after the OpenDBLink line.

if (_session_object == null)
{
_session_object = new AccpacSessionClass();
_session_object.Init("", "XX", "XX1000", "60A");
_session_object.Open(_accpac_user, _accpac_password, _company_name, DateTime.Today, 0, "");
_accpac_db_link_class = _session_object.OpenDBLink(tagDBLinkTypeEnum.DBLINK_COMPANY,tagDBLinkFlagsEnum.DBLINK_FLG_READWRITE);
}

Hoping someone will have some ideas please.

Thanks
 
What are the values of _accpac_user, _accpac_password, _company_name?
 
_company_name = SAMLTD
_accpac_user = XM
_accpacc_password = XMBASE
 
It's C#

I created a test app for the client to run in order for us to track down the problem and this is the function where it seems to fail.

It works fine on English machines.

Thanks,
 
I don't know, my C# codes works fine in English, French, and Chinese. But I do it like this:

public static AccpacCOMAPI.AccpacSession session;
.....
session = new AccpacCOMAPI.AccpacSession();
session.Init("", "XY", "XY1000", "60A");
session.Open(sAccpacUser, sAccpacPW, sCompName, DateTime.Today, 0, "");
......
 
Please show your full code including variable declarations. We can't help other than by guessing what you're doing.
 
Found the problem - was unrelated to the above code.

Error was misleading in that it was actually cominig from the section below in trying to convert a string to a double - French uses a comma (,) as decimal place instead of fullstop (.)

Simplified example
string sVersion = "6.1";
if (Convert.ToDouble(sVersion) > 5.6)
Initialise60Views()​

Solved.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top