question

Xu Chunqi avatar image
0 Likes"
Xu Chunqi asked Xu Chunqi commented

MYSQL dbsettablenum error

Hi , my database can be connected, and I can read number from it. But when I use the dbsettablenum command , the error appeared. Thanks for your answer.数据库demo.fsm

FlexSim 18.1.2
flexsim 18.1.2mysqldbsettablenum
· 2
5 |100000

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

Jeanette F avatar image Jeanette F ♦♦ commented ·

Please contact our Chinese partner, BJCSN. They can provide you with direct assistance.

为了更好更快速的解决您的问题,可以联系我们当地中国区合作伙伴 (北京创时能),他们会为您提供专业的FlexSim技术答疑.

contact information / 联系方式:
[email protected] / [email protected]
QQ: 1093796825
@CSN

0 Likes 0 ·
CSN avatar image CSN commented ·

Hi , this is the problem of our Chinese users. Our engineers cannot find the cause of the problem. Please help to have a look , thanks a lot.

0 Likes 0 ·

1 Answer

Phil BoBo avatar image
1 Like"
Phil BoBo answered Xu Chunqi commented

The deprecated legacy db...() commands and the Database Connector are two separate tools. Don't use the db...() commands. Use the Database FlexScript API.

· 3
5 |100000

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

CSN avatar image CSN commented ·

Hi , Phil,

I know what you said, the version is 18.1 , and the dbgettablenum command is ok , except the dbsettablenum is not ok.

0 Likes 0 ·
Phil BoBo avatar image Phil BoBo ♦♦ CSN commented ·

I understand that the version is 18.1. I understand that the dbgettablenum() command worked for you. The dbsettablenum() command doesn't. The db...() commands are all poorly designed, slow, and buggy. Don't use them. We've replaced them with a much better way to communicate with databases. Use the new way, not the broken, old way that does not work well and we do not support anymore.

Use the Database Connector object and the Database.Connection API. Both are available in FlexSim 18.1. See Help > FlexScript API Reference > Database.Connection. If you want to write to a database, use an INSERT INTO SQL statement. See the example in the description of Database.PreparedStatement in FlexSim 18.1's FlexScript API documentation.

0 Likes 0 ·
Xu Chunqi avatar image Xu Chunqi Phil BoBo ♦♦ commented ·

Hi, Phil

Thanks for your answer, I will tell my user to use the new way.

0 Likes 0 ·