Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > Designer> using the user contributed Informix drivers
 

Pages: 1
Designer
using the user contributed Informix drivers
Page:1/1 

  Print all messages in this thread  
Poster Message
scotru
User



Location:
College Place, WA
Joined on:
16-Feb-2006 01:03:42
Posted:
104 posts
# Posted on: 11-Aug-2008 08:13:59.  
Greetings,

I know the user-contributed Informix drivers aren't officially supported, but if anyone reading this forum has had success using them, I'd appreciate any help you could give.

I'm trying to get the "Rene" drivers working using LLBLGen Pro 1.0.2005.1 Final July 6th, 2006 (I believe the forums indicate that the drivers don't support version 2+) with Visual Studio 2005 / .NET 2.0.

For some reason, I had to remark lines 120 and 138 in InformixDBDriver.cs to get the driver to compile.

Code:

//            base.DBTypesAsProviderType[(int)InformixDbTypes.Collection] = IfxType.Collection.ToString();

//            base.DBTypesAsProviderType[(int)InformixDbTypes.RowRef] = IfxType.RowRef.ToString();


Only other change I made was removing and re-adding the reference to SD.LLBLGen.Pro.DBCoreDrive (which came up broken for me when I opened the project) After remarking these lines and adding the reference, I was able to get both the driver and the DQE to compile. I copied the drivers into C:\program files\Solutions Design\LLBLGen Pro\Drivers\Informix and the DQE to C:\program files\Solutions Design\LLBLGen Pro\RuntimeLibraries\DotNet20

I copied the Templates in with the driver and couldn't find a driver.config file in the SVN so I created this one:

Code:

<?xml version="1.0" encoding="utf-8" ?>
<!-- Informix Database driver settings. -->
<databaseDriver>
    <name>Informix Driver</name>
    <assemblyFilename>SD.LLBLGen.Pro.DBDrivers.InformixDBDriver.dll</assemblyFilename>
    <namespace>SD.LLBLGen.Pro.DBDrivers.Informix</namespace>
    <className>InformixDBDriver</className>
    <driverID>9FC4A233-5D7C-47a8-A228-2BE44C51792F</driverID>
    <dynamicQueryEngineNamespace>SD.LLBLGen.Pro.DQE.Informix</dynamicQueryEngineNamespace>
    <templatesRootFolder>Templates</templatesRootFolder>
</databaseDriver>


I used the GUID for the assembly for the driverID (is that correct?) and copied this and the other information from the AssemblyInfo.cs file.

When I try to select this as the driver for a new project in LLBLGenPro, I get this error:

The Informix driver can not be loaded due to an exception....

The format of 'SD.LLBLGen.Pro.DBDrivers.InformixDBDriver.dll' is invalid along with a stack trace. I haven't found a good way to cut'n'paste the trace from the LLBLGen message box that alerts me to it but here's the highlights:

The exception occured in System.Reflection.Assembly.nLoad called (indirectly) from SD.LLBLGen.Pro.ApplicationCore.DBDriverHelper.CreateDBDriverInstance

There's some calls in between those things. I don't think the details of the trace are important here, but let me know if they are and I can type the full stack trace.

Any help is much appreciated.

--Rudy
  Top
Walaa
Support Team



Location:

Joined on:
21-Aug-2005 16:03:48
Posted:
14588 posts
# Posted on: 11-Aug-2008 09:10:58.  
I think the stack trace might be helpfull here, would you please do a print sceen for the exception window and attach it here, rather than typing the exception.

  Top
scotru
User



Location:
College Place, WA
Joined on:
16-Feb-2006 01:03:42
Posted:
104 posts
# Posted on: 11-Aug-2008 12:18:20. Goto attachments  
Here's the stack trace.
  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37880 posts
# Posted on: 11-Aug-2008 20:16:10.  
The informix ADO.NET provider dll isn't loadable, it seems. If it's not in the GAC you should place it in the informix folder where yuo've placed the driver dll (e.g. Drivers\Informix)

In the llblgenpro.exe.config file, there's a probes path element, append your Drivers\Informix folder to that path element similar to the rest of the elements.


Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
scotru
User



Location:
College Place, WA
Joined on:
16-Feb-2006 01:03:42
Posted:
104 posts
# Posted on: 12-Aug-2008 11:44:00.  
I'm still fighting this one. I modified the .config line as follows:

Code:

<probing privatePath="Drivers\Oracle;Drivers\SqlServer;Drivers\Firebird;Drivers\Oracle10g;Drivers\Access;Drivers\DB2;Drivers\OracleDataDirect;Drivers\MySql;Drivers\Informix;TaskPerformers;ReferencedAssemblies;Plugins;TypeConverters"/>


Do I need to add anything above this line in the .config file to the assembly dependencies?

I also copied the IBM.Data.Informix.dll and for good measure the rest of my Informix\Bin directory (in case there are other dependencies) in with the driver (Drivers\Informix) as well.

I removed and readded the IBM.Data.Informix.dll reference to the driver project and rebuilt it to make sure it was referencing the correct library.

I built a very simple application that connects to my database directly using the Informix ADO .NET drivers to make sure everything is working and had success there. (code here):

Code:

            IfxConnection conn = new IfxConnection();
            conn.ConnectionString = ConnectionString;
            try
            {
                conn.Open();
                label1.Text= "Made connection!";
            }
            catch (IfxException ex)
            {
                label1.Text = "Problem with connection attempt: "
                                 + ex.Message;
            }


(connection string not included for privacy)
Running the above code gives me "Made connection!".


I tried to attach to the LLBLGenPro process to debug the exception, but since it occurs before the driver is loaded, not in the driver code, I can't.

Any additional help or ideas to try much appreciated.

Thanks!

--Rudy
  Top
scotru
User



Location:
College Place, WA
Joined on:
16-Feb-2006 01:03:42
Posted:
104 posts
# Posted on: 12-Aug-2008 11:46:11.  
P.S. I'm building against the (most current) Informix 3.50 Client SDK if that's relevent.

  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37880 posts
# Posted on: 12-Aug-2008 13:06:08.  
the IBM dll is that one in the GAC? If not, does it reference other dlls which aren't either?

In the .NET SDK there's a tool, called fuslogvw.exe. Run that tool and select llblgenpro.exe from the list of failures and yuo should get a log which dll the CLR tried to load but failed.

On a sidenote, we can't really help you with this driver, we don't have access to Informix nor the provider. Please try to step into the driver in the debugger to see what's going on.

You can do that using the following steps:
- load the driver source in vs.net and set a breakpoint, e.g. in the retrieve catalogs routine
- make sure you have placed the .pdb file and the dll in the Drivers\Informix folder
- start llblgen pro
- in vs.net, press cntr-alt-p and attach to llblgenpro.exe
- create a new project and select the driver from the combo box.

Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
scotru
User



Location:
College Place, WA
Joined on:
16-Feb-2006 01:03:42
Posted:
104 posts
# Posted on: 12-Aug-2008 19:01:42.  
I know this really isn't a supported topic and I very much appreciate your help. Do you have a PayPal account, I could send something for your time?

Okay, fuslogvw.exe very helpful here--thanks! It looks to me like it's trying to load my DLL under the .NET 1.1 Framework, whereas I'm targeting .NET 2.0

Do I need to target 1.1 for compatibility with this version of LLBLGenPro? Or is there something more I need to do in the .config file?

Code:


*** Assembly Binder Log Entry (8/12/2008 @ 9:10:10 AM) ***

The operation failed.
Bind result: hr = 0x80131107. No description available.

Assembly manager loaded from: C:\WINDOWS\Microsoft.NET\Framework\[b]v1.1.4322[/b]\fusion.dll
Running under executable C:\Program Files\Solutions Design\LLBLGen Pro\LLBLGenPro.exe
--- A detailed error log follows.

=== Pre-bind state information ===
LOG: Where-ref bind. Location = C:\Program Files\Solutions Design\LLBLGen Pro\Drivers\Informix\SD.LLBLGen.Pro.DBDrivers.InformixDBDriver.dll
LOG: Appbase = C:\Program Files\Solutions Design\LLBLGen Pro\
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = NULL
Calling assembly : (Unknown).
===

LOG: Processing DEVPATH.
LOG: Private path hint found in configuration file: Drivers\Oracle;Drivers\SqlServer;Drivers\Firebird;Drivers\Oracle10g;Drivers\Access;Drivers\DB2;Drivers\OracleDataDirect;Drivers\MySql;Drivers\Informix;TaskPerformers;ReferencedAssemblies;Plugins;TypeConverters.
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:///C:/Program Files/Solutions Design/LLBLGen Pro/Drivers/Informix/SD.LLBLGen.Pro.DBDrivers.InformixDBDriver.dll.
LOG: Assembly download was successful. Attempting setup of file: C:\Program Files\Solutions Design\LLBLGen Pro\Drivers\Informix\SD.LLBLGen.Pro.DBDrivers.InformixDBDriver.dll
LOG: Entering run-from-source setup phase.
ERR: Error extracting manifest import from file (hr = 0x80131107).
ERR: Failed to complete setup of assembly (hr = 0x80131107). Probing terminated.


In answer to other questions:
IBM dll is in the GAC (and I tried removing and reinstalling it to be sure).

I tried the debugger--but the error is happening too soon--the Informix driver DLL code is never entered.



  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37880 posts
# Posted on: 13-Aug-2008 16:56:27.  
1.0.2005.1 is build against .net 1.1, so yes, you should build the driver with .net 1.1, I'm afraid.
Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
scotru
User



Location:
College Place, WA
Joined on:
16-Feb-2006 01:03:42
Posted:
104 posts
# Posted on: 13-Aug-2008 21:28:46.  
Okay, makes sense. Would an upgrade solve this?

That is, have the driver structures changed for newer versions of LLBLGenPro? If I upgrade to use a newer version, can I still use the same Informix driver (and build in 2005)? Or would upgrading force me to build in 2008?

Thanks again for all your assistance. LLBLGenPro support is really top notch.



  Top
Walaa
Support Team



Location:

Joined on:
21-Aug-2005 16:03:48
Posted:
14588 posts
# Posted on: 14-Aug-2008 09:45:28.  
LLBLGen Pro 2.x Designer is built with .NET 2.0
So you'd have to build the driver against .NET 2.0 (using V.S 2005)
  Top
scotru
User



Location:
College Place, WA
Joined on:
16-Feb-2006 01:03:42
Posted:
104 posts
# Posted on: 16-Aug-2008 04:22:55.  
Just some follow up for anyone reading the forums working with the Informix driver. I was able to get the driver working but had trouble with versioning. It seem obvious now, but hopefully they can be helpful to someone else. Here's what I found:

1) The InformixDBDriver project needs to be built in VS 2003 (1.1) for use with the LLBLGen Pro 1.0.2005.1. The DQE driver does NOT support LLBLGen Pro 2+ (but does support VS 2005, see below). I spent a 1/2 day working on porting it to the LLBLGenPro 2 format and decided it wasn't worth the effort for me on this project (the InformixDBDriver and Templates were fairly easy to port, but the DQE driver structure gave me trouble).

However, you can still still target VS 2005 for your projects provided you build the runtime DQE driver targeting .NET 2.x

2) In fact, the DQE driver in the Rene Project is, I believe, designed for VS 2005 (2.x). So unless you want to backport it (which actually I did at one point and wasn't too bad, there's just a few code changes), you need to build the DQE driver in VS 2005 for .NET 2.0.

3) This means you should make sure to target VS 2005 when generating the code for your project with the generated DQE.

4) Both projects can be built against the current version (3.50) of the Informix Client SDK. Make sure you use the IBM.Data.Informix build for .NET 1.1 in the Driver project, and the version built for .NET 2.0 in the DQE project.

5) Finally, look out because the DQE has some code in it for adding "mutator" information to each update query and a timestamp. Unless your database is built for that, you'll need to remove the line that appends it to the query from the DQE driver.

Throughout your process make sure you are linking the correct versions of each DLL (orm support classes, Informix ADO.NET provider, etc..)--it's easy to lose track.

Thanks to the LLBLGen team again for the good support and let me cast my vote for adding Informix and SQLite to the supported DB set (I know Informix usage is waining, but I still run into it from time to time).

Also big thanks to the original Informix driver authors!


  Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.