Group,

I've written what I believe is fairly simple code to populate a combobox via data from an Oracle Database. Unfortunately it isn't working and the error in the output box says: "Exception thrown: 'System.BadImageFormatException' in OracleConnections.exe" (the name I've assigned to the program is "OracleConnections"). This is not an error I've seen before. But this is also the first time I've connected to a server.

In reading I see that this could be an issue of a 32bit version vs. a 64bit version. I'm using Visual Studio Express 2015 to build this in. I don't know if there are different "bit" versions of VS 2015. But none of my 32 bit versions of Excel with SQL work in my 64 bit version of Office.

Here's the output code I'm getting. Hopefully this will help you explain to me what's happening"

'OracleConnections.vshost.exe' (CLR v4.0.30319: OracleConnections.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'OracleConnections.vshost.exe' (CLR v4.0.30319: OracleConnections.vshost.exe): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities\14.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'OracleConnections.vshost.exe' (CLR v4.0.30319: OracleConnections.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'OracleConnections.vshost.exe' (CLR v4.0.30319: OracleConnections.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'OracleConnections.vshost.exe' (CLR v4.0.30319: OracleConnections.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'OracleConnections.vshost.exe' (CLR v4.0.30319: OracleConnections.vshost.exe): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities.Sync\14.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.Sync.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'OracleConnections.vshost.exe' (CLR v4.0.30319: OracleConnections.vshost.exe): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.Debugger.Runtime\14.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Debugger.Runtime.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'OracleConnections.vshost.exe' (CLR v4.0.30319: OracleConnections.vshost.exe): Loaded 'C:\Users\donacwil\Documents\Visual Studio 2015\Projects\Oracle Connections\WindowsApplication2\bin\Debug\OracleConnections.vshost.exe'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'OracleConnections.vshost.exe' (CLR v4.0.30319: OracleConnections.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'OracleConnections.vshost.exe' (CLR v4.0.30319: OracleConnections.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'OracleConnections.vshost.exe' (CLR v4.0.30319: OracleConnections.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Deployment\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Deployment.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'OracleConnections.vshost.exe' (CLR v4.0.30319: OracleConnections.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'OracleConnections.vshost.exe' (CLR v4.0.30319: OracleConnections.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.Linq.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'OracleConnections.vshost.exe' (CLR v4.0.30319: OracleConnections.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Data.DataSetExtensions\v4.0_4.0.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'OracleConnections.vshost.exe' (CLR v4.0.30319: OracleConnections.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Net.Http\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Net.Http.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'OracleConnections.vshost.exe' (CLR v4.0.30319: OracleConnections.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.VisualBasic\v4.0_10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualBasic.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
The thread 0x266c has exited with code 0 (0x0).
The thread 0x28a4 has exited with code 0 (0x0).
'OracleConnections.vshost.exe' (CLR v4.0.30319: OracleConnections.vshost.exe): Loaded 'C:\Users\donacwil\Documents\Visual Studio 2015\Projects\Oracle Connections\WindowsApplication2\bin\Debug\OracleConnections.exe'. Symbols loaded.
'OracleConnections.vshost.exe' (CLR v4.0.30319: OracleConnections.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Remoting\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Remoting.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'OracleConnections.vshost.exe' (CLR v4.0.30319: OracleConnections.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Exception thrown: 'System.BadImageFormatException' in OracleConnections.exe

Any thoughts?

In advance, thanks for your assistance with this.

Don

Oracle has referred me to Microsoft. They say it's a Visual Studio issue.

:(

Don

Just reread the discussion at the link I shared and the Don there wrote:

Thanks for the quick response. Your notes seemed to do the trick. I've connected and am in. THANK YOU!!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.