New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect Exception - Could not find FirebirdSql.Data.FirebirdClient.resources [DNET488] #474
Comments
Modified by: Manfred Roßkamp (manni)description: If you cause an exception for example with the following incorrect sql statement: In my environment i have the following dictionary structure: MyApp.exe MyApp is compiled in AnyCPU and it load's dynamically the FirebirdSql.Data.FirebirdClient.dll from the correct subfolder. I solved this problem with the following changes in FirebirdSql.Data.Common.IscException
2. Call the specified method instead of creating a new ResourceManager at => If you cause an exception for example with the following incorrect sql statement: In my environment i have the following dictionary structure: MyApp.exe MyApp is compiled in AnyCPU and it load's dynamically the FirebirdSql.Data.FirebirdClient.dll from the correct subfolder. I solved this problem with the following changes in FirebirdSql.Data.Common.IscException
2. Call the specified method instead of creating a new ResourceManager stacktrace: |
Modified by: Manfred Roßkamp (manni)description: If you cause an exception for example with the following incorrect sql statement: In my environment i have the following dictionary structure: MyApp.exe MyApp is compiled in AnyCPU and it load's dynamically the FirebirdSql.Data.FirebirdClient.dll from the correct subfolder. I solved this problem with the following changes in FirebirdSql.Data.Common.IscException
2. Call the specified method instead of creating a new ResourceManager stacktrace: => If you cause an exception for example with the following incorrect sql statement: In my environment i have the following folder structure: MyApp.exe MyApp is compiled in AnyCPU and it load's dynamically the FirebirdSql.Data.FirebirdClient.dll from the correct subfolder. I solved this problem with the following changes in FirebirdSql.Data.Common.IscException
2. Call the specified method instead of creating a new ResourceManager stacktrace: |
Modified by: @cincuranetstatus: Open [ 1 ] => In Progress [ 3 ] |
Commented by: @cincuranet Please provide a test-case. |
Commented by: Manfred Roßkamp (manni) I add a test project that shows the bug. |
Modified by: Manfred Roßkamp (manni)Attachment: MyApp.7z [ 12363 ] |
Modified by: @cincuranetstatus: In Progress [ 3 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: vNext [ 10587 ] |
Submitted by: Manfred Roßkamp (manni)
Attachments:
MyApp.7z
If you cause an exception for example with the following incorrect sql statement:
"select date() from xy"
I get the following exception:
{"Die Datei \"FirebirdSql.Data.FirebirdClient.resources\" konnte nicht gefunden werden.":null}
(Look at the end of this description for the stacktrace)
In my environment i have the following folder structure:
MyApp.exe
Firebird\x32\FirebirdSql.Data.FirebirdClient.dll
Firebird\x32\*(32 bit Firebird embedded Version)
Firebird\x64\FirebirdSql.Data.FirebirdClient.dll
Firebird\x64\*(64 bit Firebird embedded Version)
MyApp is compiled in AnyCPU and it load's dynamically the FirebirdSql.Data.FirebirdClient.dll from the correct subfolder.
I solved this problem with the following changes in FirebirdSql.Data.Common.IscException
1. Add the following method to get the correct resource set:
2. Call the specified method instead of creating a new ResourceManager
a. In the method BuildSqlState():
var rm = GetResourceSet("FirebirdSql.Resources.sqlstate_mapping");
this.SQLSTATE = rm.GetString(this.ErrorCode.ToString());
b. In the method BuildExceptionMessage():
StringBuilder builder = new StringBuilder();
var rm = GetResourceSet("FirebirdSql.Resources.isc_error_msg");
stacktrace:
bei System.Reflection.RuntimeAssembly.InternalGetSatelliteAssembly(String name, CultureInfo culture, Version version, Boolean throwOnFileNotFound, StackCrawlMark& stackMark)
bei System.Resources.ManifestBasedResourceGroveler.GetSatelliteAssembly(CultureInfo lookForCulture, StackCrawlMark& stackMark)
bei System.Resources.ManifestBasedResourceGroveler.GrovelForResourceSet(CultureInfo culture, Dictionary`2 localResourceSets, Boolean tryParents, Boolean createIfNotExists, StackCrawlMark& stackMark)
bei System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo requestedCulture, Boolean createIfNotExists, Boolean tryParents, StackCrawlMark& stackMark)
bei System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)
bei System.Resources.ResourceManager.GetString(String name, CultureInfo culture)
bei System.Resources.ResourceManager.GetString(String name)
bei FirebirdSql.Data.Common.IscException.BuildSqlState()
bei FirebirdSql.Data.Common.IscException.BuildExceptionData()
bei FirebirdSql.Data.Client.Native.FesConnection.ParseStatusVector(IntPtr[] statusVector, Charset charset)
bei FirebirdSql.Data.Client.Native.FesDatabase.ParseStatusVector(IntPtr[] statusVector)
bei FirebirdSql.Data.Client.Native.FesStatement.Prepare(String commandText)
bei FirebirdSql.Data.FirebirdClient.FbCommand.Prepare(Boolean returnsSet)
bei FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteCommand(CommandBehavior behavior, Boolean returnsSet)
bei FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteReader(CommandBehavior behavior)
bei FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteDbDataReader(CommandBehavior behavior)
Commits: f407579
The text was updated successfully, but these errors were encountered: