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

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

monika_k
Not applicable
50 Views
5 Replies
Message 1 of 6

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

monika_k
Not applicable

[ FlexSim 20.1.3 ]

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.

31314-1595589962449.png


Best regards,

Monika

0 Likes
Accepted solutions (1)
51 Views
5 Replies
Replies (5)
Message 2 of 6

joerg_vogel_HsH
Mentor
Mentor

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.

Message 3 of 6

matt_long
Not applicable

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
Message 4 of 6

monika_k
Not applicable

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
Message 5 of 6

monika_k
Not applicable

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
Message 6 of 6

JordanLJohnson
Autodesk
Autodesk
Accepted solution

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:
31434-1595965741863.pngThe 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
.


Jordan Johnson
Principal Software Engineer
>