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
|
Testing LINQPad 4.47.02 with LightSpeed LINQPad Driver 3.0.0.13259. I have SQLServer 2012 Express 64bit, DB2 Express 10.5, and Visual Studio 2013 installed. Trying to test using two different data providers. First test: SQL Server ExpressSet the Model to utilize SqlServer and recompile. The solution in VS2013 works as expected. Selected the Model.dll and ModelUnitOfWork tested and working in VS2013. The Data Provider and Connection string were inferred from the Model. If I select SqlServer2005 as the Data Provider Query's works in LINQPad. If I select SqlServer2008 I get a FileNotFoundExecption: Could not find file or assembly 'Mindscape.LightSpeed.Providers.DB2'. Second test: DB2 ExpressI set the model to utilize DB2 and recompile. The solution in VS2013 works. Created a new connection and selected the model.dll and ModelUnitOfWork tested in VS2013. The Data Provider and Connection string were inferred from the Model and look correct. When I try to execute a query pointing to DB2 I get the following: LinqPad Error (Could not open a connection to SQL Server) when trying to connect to DB2 A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action |
|
|
Try using this updated LINQPad driver. Let us know if the issue continues after updating.
|
|
|
Tests with updated LINQPad Driver. Test 1: SQLServer2008 Worked. Test2: DB2 Selected DB2. I get a FileNotFoundExecption. at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection) at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.Load(String assemblyString) at Mindscape.LightSpeed.LightSpeedContext.ˆ(String , String ) at Mindscape.LightSpeed.LightSpeedContext.setDataProvider(DataProvider value) HelpLink null Source mscorlib HResult -2147024894 Message Could not load file or assembly 'Mindscape.LightSpeed.Providers.DB2' or one of its dependencies. The system cannot find the file specified. FileName Mindscape.LightSpeed.Providers.DB2 FusionLog === Pre-bind state information === LOG: DisplayName = Mindscape.LightSpeed.Providers.DB2 (Partial) WRN: Partial binding information was supplied for an assembly: WRN: Assembly Name: Mindscape.LightSpeed.Providers.DB2 | Domain ID: 9 WRN: A partial bind occurs when only part of the assembly display name is provided. WRN: This might result in the binder loading an incorrect assembly. WRN: It is recommended to provide a fully specified textual identity for the assembly, WRN: that consists of the simple name, version, culture, and public key token. WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue. LOG: Appbase = file:///D:/Tools/LINQPad/ LOG: Initial PrivatePath = NULL Calling assembly : Mindscape.LightSpeed, Version=5.0.2597.0, Culture=neutral, PublicKeyToken=360c8f37b466ebb2. LOG: This bind starts in LoadFrom load context. WRN: Native image will not be probed in LoadFrom context. Native image will only be probed in default load context, like with Assembly.Load(). LOG: No application configuration file found. LOG: Using host configuration file: LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config. LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind). LOG: Attempting download of new URL file:///D:/Tools/LINQPad/Mindscape.LightSpeed.Providers.DB2.DLL. LOG: Attempting download of new URL file:///D:/Tools/LINQPad/Mindscape.LightSpeed.Providers.DB2/Mindscape.LightSpeed.Providers.DB2.DLL. LOG: Attempting download of new URL file:///D:/Tools/LINQPad/Mindscape.LightSpeed.Providers.DB2.EXE. LOG: Attempting download of new URL file:///D:/Tools/LINQPad/Mindscape.LightSpeed.Providers.DB2/Mindscape.LightSpeed.Providers.DB2.EXE. LOG: Attempting download of new URL file:///C:/Users/ljewell/AppData/Local/Temp/LINQPad/jjjtfaod/shadowdijjqi/Mindscape.LightSpeed.Providers.DB2.DLL. LOG: Attempting download of new URL file:///C:/Users/ljewell/AppData/Local/Temp/LINQPad/jjjtfaod/shadowdijjqi/Mindscape.LightSpeed.Providers.DB2/Mindscape.LightSpeed.Providers.DB2.DLL. LOG: Attempting download of new URL file:///C:/Users/ljewell/AppData/Local/Temp/LINQPad/jjjtfaod/shadowdijjqi/Mindscape.LightSpeed.Providers.DB2.EXE. LOG: Attempting download of new URL file:///C:/Users/ljewell/AppData/Local/Temp/LINQPad/jjjtfaod/shadowdijjqi/Mindscape.LightSpeed.Providers.DB2/Mindscape.LightSpeed.Providers.DB2.EXE. |
|
|
Testing with DB2 and Updated LINQPad Driver. After looking at the stacktrace, I copied the DB2 provider dll from my LightSpeed\Providers install folder into my LINQPad folder. Refreshed the connection and it worked. Question: Should I be required to copy the LightSpeed provider for DB2 into the LINQPad folder? None of the others required being copied. |
|
|
Yes, I would expect any of the satellite providers will need to be in the current folder for the running executable, in this case the LINQPad folder since LINQPad is performing the assembly load.
|
|