Closed Bea1906 closed 3 years ago
Hello @Bea1906 ,
This exception should have an inner exception, is it possible to get the inner exception message as well?
That will for sure give us some information to better understand what is happening in your case.
Best Regards,
Jon
Hello Jonathan, I am using the Visual Studio as an OutSystems extension, it works the same but is harder to debug, I found the inner Exception:
System.Exception: An error occured while retrieving the InformationSchemaTable information. See the inner exception for details. ---> System.InvalidOperationException: There is already an open DataReader associated with this Command which must be closed first. at System.Data.SqlClient.SqlInternalConnectionTds.ValidateConnectionForExecute(SqlCommand command) at System.Data.SqlClient.SqlCommand.ValidateCommand(String method, Boolean async) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) at .(DbCommand , CommandBehavior , BulkOperation , Int32 ) at .(Boolean , String[] ) at Z.BulkOperations.BulkOperation.() --- End of inner exception stack trace --- at Z.BulkOperations.BulkOperation.() at Z.BulkOperations.BulkOperation.Execute() at OutSystems.NssBirdlyData.CssBirdlyData.MssMigrate(RCMigrationConfigRecord ssConfig, Boolean& ssIsSuccess, String& sserrorMessage)
Hello JonathanMagnan , using this Visual studio version connected to Outsystems is hard to debug but since I could print the innerException I knew what the error was and it is fixed. I want to thank you for the help, even if it was just to print the inner exception, you reply really fast and I am really thankful for that !
Awesome ;)
No problem, I'm glad you find out about this issue.
Have a great weekend,
Best Regards,
Jon
I am developing a tool to migrate data and I am using your Z.BulkOperations to insert data from source to destiny. The problem is that when I perform the bulk.BulkInsert(dataTable) I am getting this error : “An error occured while retrieving the InformationSchemaTable information”. I do not know why this happens, but in my code I am only adding the columns to the data Table that are also in the destiny schema. The part of my code where I do this is before filling the DataTable dt : (The code passes here with no problems)
Then after add the data to the dataTable I perform the bulk.BulkInsert(dt) that is where the error occurs Do you know why the error occurs and how can I solve it?