Need a special offer?Find out if your project fits.
+

Multiple Call API - Sql Databases

Answered
Rafael Mello asked on January 6, 2020

Hello, 
I´m using Flexmonster by Connecting to Sql Databases (with FlexMonster Compressor - .NetCore webapi)
But, i´m having a problem. I´m getting the error:
"It seems that this file doesn't exist or 'Access-Control-Allow-Origin' header is absent in the requested resource."
I realized that this error occurs because the Flexmonster is calling the API twice when i create the new FlexMonster(...) instance, one of these call is been sending without the requestHeaders, which is necessary to make an autentication on my API.
 
Could somebody help-me?
 
Update:
I´m using the 2.7.22 version 
Using the 2.6.5 version , the problem not happen. but i get another issue about decimal places without dot or comma.
 
Update 2: I understood the problem. The problem was the dataSource type.
It was "OCSV" on 2.6.5 version, now it´s only "CSV".
I didn´t find it on documentation. 
 
Thank you so much
 
 
 

1 answer

Public
Vera Didenko Vera Didenko Flexmonster January 8, 2020

Hello, Rafael,
 
Thank you for writing to us.
 
We are glad to hear that you have managed to resolve the issue.
 
Indeed, starting from version 2.7.14 the Data Compressor gives data in CSV format instead of OCSV. Due to these changes, the dataSource type is specified as CSV also. 
For backward compatibility, Flexmonster can still accept OCSV data if the dataSource type is specified as OCSV.
However, if the dataSource type is specified as OCSV but the data is received in a different format, for example, CSV, then backward compatibility operations are made:
During the first data load, the data format is determined. If the data format is not OCSV, the required loader for the determined data format is chosen and the data is loaded a second time via the appropriate loader.
 
We would like to confirm that specifying the dataSource type as CSV is the recommended way.
 
Please let us know if you have any further questions.
 
Best Regards,
Vera

Please login or Register to Submit Answer