This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi,
not sure if this is the right place to ask, but I am having trouble using lightspeed extension in linqpad on 64bit win 7. I can get connected and I see the entities on the left side but if I try to do a query I get this: InvalidOperationException: Attempt to load Oracle client libraries threw BadImageFormatException. This problem will occur when running in 64 bit mode with the 32 bit Oracle client components installed.
If I force linqpad to be 32bit, then I can't even get lightspeed connect dialog box to open, it just crashes. Any help would be appreciated! |
|
|
Hello Robert, Thanks for letting us know about this. We've had occasional problems with the Oracle components throwing this exception on 64-bit machines and we haven't yet found a satisfactory resolution, but we will keep looking. To help us prioritise this investigation, are you using Oracle.DataAccess (Oracle9Odp provider) or the Microsoft Oracle stack (Oracle9 provider)? Which version of the Oracle client do you have installed and is it the 32-bit or 64-bit version? Regarding the crash when you force LINQPad to be 32 bit, does LINQPad tell you the exception details? I think LINQPad has a logging switch which might be able to capture it for you; alternatively, if it displays the "send error report" dialog then do submit the crash report and I'll ping the author of LINQPad to get the diagnostics off him. Thanks again for reporting this problem -- I hope we'll be able to resolve it for you quickly, though as I mentioned we think this may be a troublesome one... |
|
|
I'm using the microsoft client. I've now installed both 32 and 64bit oracle client, but from what I've seen with process monitor Lightspeed binds to ODP version 1.0 which is only found in my 32 bit installation. Perhaps there is some way of forcing version 2? As for LINQpad crash it seem to be relating to the fact that I forced 32 bit version: 2.12.5 2010-03-17T11:50:19.6880645+01:00 ProcessException - |
|
|
[quote user="robertivanc"]I've now installed both 32 and 64bit oracle client, but from what I've seen with process monitor Lightspeed binds to ODP version 1.0 which is only found in my 32 bit installation. [/quote] Hmm, thanks, this is useful info. One thing you could try is setting up a binding redirect, mapping the v1.0 driver to v2, but this depends on whether you're seeing it loading v1 managed or unmanaged DLLs -- if it's unmanaged DLLs then the redirect won't help. It *might* help to install and use the Oracle.DataAccess driver, since that *might* try to load the more current unmanaged DLLs (and would hopefully pick up the 64-bit versions). I appreciate that this may be non-trivial to test out though. I don't have a 64-bit machine to hand today, so I'm not really going to be able to provide any tested advice until tomorrow at the earliest. Hopefully one of the above suggestions will help though. |
|
|
it's trying to load C:\ora10\bin\OraOps10.dll which I believe is managed? Do you have an example how such a redirect would look like? Thanks! |
|
|
I don't have an example for Oracle but MSDN has examples of what a binding redirect looks like in general: http://msdn.microsoft.com/en-us/library/7wd6ex19.aspx This does look though as though it may handle only side-by-side DLLs though, which makes me a bit pessimistic about whether it will help in your case... |
|
|
I got now 32bit version from Joe - http://forums.oreilly.com/content/C-3-0-in-a-Nutshell/17265/Linqpad-And-Lightspeed-Oracle-On-64-Bit/#entry29752 and it works ok, although if I query from the view (tables work ok) I get back FormatException: Input string was not in a correct format. I am trying to figure out now if this is from linqpad or lightspeed.
|
|
|
Ha, I've nailed this one. For some reason Lightspeed designer decided that the Id for this view is of type Int (even though there is no primary key, as it is a view not a table), and then when it was generating SQL queries that wanted a field named ID I've added one to the view, but I didn't change in the generated .cs file that the Id type is now string (I wonder if anyone can make sense of this! ) In any case, it works now! :) |
|
|
Glad to hear this is working now and we really appreciate the updates -- it helps us to assist other customers who may run into the same thing. Regarding LightSpeed inferring the wrong type for the view "primary key" -- LightSpeed requires every entity to have an ID, but as you note, views don't have primary keys, so we guess which column is the ID based on the column name. If we can't find a column named Id, then we guess integer as a default. I think we emit a warning in this case but it can be missed if you don't have the Visual Studio Output window open. In any case, your solution of adding the ID column into the view is exactly what is required. Once again, glad to hear that things are working for you now and we're sorry this has been a bit frustrating to get running! |
|