system.data.dll Error
Posted: Tue Apr 30, 2019 2:42 pm
Hi to all,
I've a strange problem on a Windows 10 Build 17763.379.
Trying to connect to MySQL 5.1 using MySql.Data.dll (Framework 4.0) I have this error:
[from my error log file:]
***********************ERROR********************************
2019-30-04 11:29:42
Application: GDOfat 4.6.2l
Error Message:
Non è stato possibile caricare il file o l'assembly 'System.Data.dll' o una delle relative dipendenze. non è un'applicazione di Win32 valida. (Eccezione da HRESULT: 0x800700C1)
GDOStaticLibrary
in GDOStaticLibrary.Globals.Connetti()
in GDOfatCOM.GDOcomXML.ExportFatturaXML(String sPath, String sNomeFile, String sNrFil, String sTR, String sAnno, String sNumdoc, String sSeriedoc) in C:UsersGianlucadocumentsvisual studio 2015ProjectsGDOfatWriteXMLGDOfatCOMGDOcomXML.prg:riga 50
***********************ERROR********************************
Since this procedure is alive in ~300 installations, and was working fine also in this PC since some days ago, I deduced it was a SO problem so I tryed to update the system, and the error now is:
***********************ERROR********************************
2019-30-04 16:03:24
Application: GDOfat 4.6.2l
Error Message:
Non è stato possibile caricare il file o l'assembly 'System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' o una delle relative dipendenze. Firma del metodo con convenzione di chiamata non valida. (Eccezione da HRESULT: 0x80131239)
GDOStaticLibrary
in GDOStaticLibrary.Globals.Connetti()
in GDOfatCOM.GDOcomXML.ExportFatturaXML(String sPath, String sNomeFile, String sNrFil, String sTR, String sAnno, String sNumdoc, String sSeriedoc) in C:UsersGianlucadocumentsvisual studio 2015ProjectsGDOfatWriteXMLGDOfatCOMGDOcomXML.prg:riga 50
Error Message:
Firma del metodo con convenzione di chiamata non valida. (Eccezione da HRESULT: 0x80131239)
***********************ERROR********************************
I've also tryed to:
1) Uninstall/Reinstall Frameword 4.7
2) Run NetFxRepairTool.exe
But the error still remain.
Anyone have an idea how to fix this problem without reinstall the SO?
I was forgetting to include the connection method:
PUBLIC static METHOD Connetti() AS LOGIC
LOCAL lResult := TRUE AS LOGIC
sConnectionString := i"server={sServer}; port={sPort}; user id={sUser}; password={sPwd}; database={sDatabase};pooling=false"
Globals.oConn := MySql.Data.MySqlClient.MySqlConnection{sConnectionString}
TRY
oConn:Open()
CATCH ex AS MySqlException
WriteLog("oConn: Error connecting to the server: " + ex:Message)
lResult := FALSE
END TRY
return lResult
Regards
Gianluca Pinoli
I've a strange problem on a Windows 10 Build 17763.379.
Trying to connect to MySQL 5.1 using MySql.Data.dll (Framework 4.0) I have this error:
[from my error log file:]
***********************ERROR********************************
2019-30-04 11:29:42
Application: GDOfat 4.6.2l
Error Message:
Non è stato possibile caricare il file o l'assembly 'System.Data.dll' o una delle relative dipendenze. non è un'applicazione di Win32 valida. (Eccezione da HRESULT: 0x800700C1)
GDOStaticLibrary
in GDOStaticLibrary.Globals.Connetti()
in GDOfatCOM.GDOcomXML.ExportFatturaXML(String sPath, String sNomeFile, String sNrFil, String sTR, String sAnno, String sNumdoc, String sSeriedoc) in C:UsersGianlucadocumentsvisual studio 2015ProjectsGDOfatWriteXMLGDOfatCOMGDOcomXML.prg:riga 50
***********************ERROR********************************
Since this procedure is alive in ~300 installations, and was working fine also in this PC since some days ago, I deduced it was a SO problem so I tryed to update the system, and the error now is:
***********************ERROR********************************
2019-30-04 16:03:24
Application: GDOfat 4.6.2l
Error Message:
Non è stato possibile caricare il file o l'assembly 'System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' o una delle relative dipendenze. Firma del metodo con convenzione di chiamata non valida. (Eccezione da HRESULT: 0x80131239)
GDOStaticLibrary
in GDOStaticLibrary.Globals.Connetti()
in GDOfatCOM.GDOcomXML.ExportFatturaXML(String sPath, String sNomeFile, String sNrFil, String sTR, String sAnno, String sNumdoc, String sSeriedoc) in C:UsersGianlucadocumentsvisual studio 2015ProjectsGDOfatWriteXMLGDOfatCOMGDOcomXML.prg:riga 50
Error Message:
Firma del metodo con convenzione di chiamata non valida. (Eccezione da HRESULT: 0x80131239)
***********************ERROR********************************
I've also tryed to:
1) Uninstall/Reinstall Frameword 4.7
2) Run NetFxRepairTool.exe
But the error still remain.
Anyone have an idea how to fix this problem without reinstall the SO?
I was forgetting to include the connection method:
PUBLIC static METHOD Connetti() AS LOGIC
LOCAL lResult := TRUE AS LOGIC
sConnectionString := i"server={sServer}; port={sPort}; user id={sUser}; password={sPwd}; database={sDatabase};pooling=false"
Globals.oConn := MySql.Data.MySqlClient.MySqlConnection{sConnectionString}
TRY
oConn:Open()
CATCH ex AS MySqlException
WriteLog("oConn: Error connecting to the server: " + ex:Message)
lResult := FALSE
END TRY
return lResult
Regards
Gianluca Pinoli