question

yuan zhang avatar image
1 Like"
yuan zhang asked Li ze answered

ODBC Error-Flexsim Code 17

Dear all,

When accessing the Oracle database, the following dialog box is displayed.Does anyone know what is the reason ?Thanks.

FlexSim 16.1.2
odbc error-flexsim code 17
error.png (82.6 KiB)
· 9
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Ben Wilson avatar image Ben Wilson ♦♦ commented ·

@yuan zhang,

Is there a translation for the "ODBC code" portion of the error message? The part with the Chinese characters?

0 Likes 0 ·
Steven Hamoen avatar image Steven Hamoen Ben Wilson ♦♦ commented ·

Hi @Ben Wilson On the old forum there was a post with the same error but I'm not sure if the same Flexsim Code always has the same ODBC code. Anyway check it out: ODBC Error old forum

1 Like 1 ·
Ben Wilson avatar image Ben Wilson ♦♦ Ben Wilson ♦♦ commented ·

If we were able to search based on the ODBC error code, we might find more information. See this question as an example.

If any Chinese speakers out there can help with either searching for the error code, or providing a translation, that would be most helpful. Thanks!

@jing.chen, @yuan zhang, @wang.yang

0 Likes 0 ·
yuan zhang avatar image yuan zhang Ben Wilson ♦♦ commented ·

Hi Ben,I'm sorry to see the reply so late.The part with Chinese characters are not displayed properl,they are garbled.I'm not sure what it means.Thanks!

0 Likes 0 ·
Show more comments
Show more comments
Ben Wilson avatar image Ben Wilson ♦♦ commented ·

@yuan zhang,

Here is information regarding the SQLFetchScroll function. Probably if we couple this with the ODBC error code we'll have a good idea what is going on.

0 Likes 0 ·
yuan zhang avatar image yuan zhang Ben Wilson ♦♦ commented ·

@Ben Wilson

That's great!Thanks!

It will be useful for me checking the error.Yesterday I switched the operating system language and FlexSim installation to English ,Unfortunately, there is no pop window yet.I will continue to be concerned.

0 Likes 0 ·
yuan zhang avatar image yuan zhang Ben Wilson ♦♦ commented ·

@Ben Wilson

Hi Ben, I switched the operating system language and FlexSim installation to English,but the ODBC error code still garbled.I tried to set up the breakpoint,when it runs to line 23 and press continue button,the following dialog box is displayed.But not every time executing the code prompts error,it is a small probability event.I really can not find the reason.

0 Likes 0 ·
20170425204946.png (404.5 KiB)

1 Answer

·
Li ze avatar image
0 Likes"
Li ze answered

You can post more detailed information.

Why do you set SQLname as "var" ? It would be better to set it as a string variable.

What's the result of "SQLname"?

You can rewrite you code as follow and watch Local Variables.

string SQLname = gettabelstr("mes表单对照表,index,2);
string sqlstr = "Select * From MES." + SQLname;
int condition =dbopen("CIGflexsim",sqlstr,0);
if(!condition)
{
//.....
}
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.