question

Monika Sokół avatar image
0 Likes"
Monika Sokół asked Jordan Johnson answered

If there is an option to export more than 2100 cells to the database?

Hello,


I have a model, which is run automatically and export data to the database. Sometimes can happen that there are more cells than the limit 2100. How should I solve this?

Error message here:

Exception thrown in database export: 42000 [Microsoft][ODBC SQL Server Driver][SQL Server]There are too many parameters in this EXECUTE statement. The maximum number is 2100.


Best regards,

Monika

FlexSim 20.1.3
flexsim 20.1.3data exportdatabase export exception
1595589962449.png (4.8 KiB)
· 4
5 |100000

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

Joerg Vogel avatar image Joerg Vogel commented ·

I looked for your question at different other sites. The limit is part of the driver structure. It limits the parameters a query can take. I read about a different access to a database or to split one query into more shorter queries. But I think it isn’t a FlexSim related problem.

Specification of SQL Server

I recently read about this error, that indexed tables caused the error in another software. But this error belongs to many more issues. Maybe you can attach the code, which causes the error. Naturally not the current code, but the structure of it. And perhaps you are allowed to share the datatype of columns. There are reported problems with arrays for example.

1 Like 1 ·
Monika Sokół avatar image Monika Sokół Joerg Vogel commented ·

In terms of data type stored in columns, there are only string and numerical values. There is a question is there a possibility to create export to the database not like parameter export, rather like by columns or other mentioned in the attached article?

0 Likes 0 ·
Matt Long avatar image Matt Long commented ·

I don't know much about databases, but you should be able to split your export into multiple calls to the database right?

0 Likes 0 ·
Monika Sokół avatar image Monika Sokół Matt Long commented ·

Yes, I know how to split the export, but this solution is not satisfactory for my client. The idea is how to export data to the database without splitting it. I need to export 11 columns no matter how many rows there are. To built the export I use DBConnector.

0 Likes 0 ·

1 Answer

·
Jordan Johnson avatar image
2 Likes"
Jordan Johnson answered

In the tree, you should be able to find your database connector in the Tools folder. Inside that object, one of the variables should be a list of exporters:
The batch size seems to be 1000 by default, which is how many rows to export in a single statement. If you decrease that number, the exporter will work properly. Just make sure that

[Batch Size] x [Number of Columns] <= 2100

1595965741863.png (22.8 KiB)
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.