On Dec 2, 3:14 pm, Jonathan Pryor <[email protected]> wrote:
> On Wed, 2009-12-02 at 07:26 -0800, Zak wrote:
> > Running DbMetal,  after copying DbMetal.exe.config to /build (easily
> > fixed with MonoDevelop),. I ran into some interesting exceptions.
>
> What exceptions are you seeing?

System.ArgumentNullException: Argument cannot be null.

because the environment variable did not exist, and calling
Environment.GetEnvironmentVariable("SystemRoot") returned null.

> So the proper solution is to insert a catch{} in the appropriate spot so
> that a stack trace isn't printed (which may already happen), for
> starters.

Handling or swallowing the exception would work too, but for now its
just commented out, and I was able to move forward. A few small
changes:

Index: DbLinq/Vendor/Implementation/SchemaLoader.TypeMapping.cs
===================================================================
--- DbLinq/Vendor/Implementation/SchemaLoader.TypeMapping.cs    (revision
1285)
+++ DbLinq/Vendor/Implementation/SchemaLoader.TypeMapping.cs    (working
copy)
@@ -187,6 +187,7 @@
             case "datetime":
             case "ingresdate":
             case "timestamp":
+            case "timestamp with time zone":  //PostgreSQL
             case "timestamp without time zone":
             case "time":
             case "time without time zone": //reported by
[email protected],
@@ -214,6 +215,7 @@
             case "uuid":
                 return typeof(Guid);

+            case "array":  // PostgreSQL has an array type, this is
just to get past it
             case "void":
                 return null;

and I was able to get a .dbml which after editing (I am only after a
few tables in my db) generated code. I am however running into
problems with the generated code but that will be a different post
once I get more detail worked out.

Zak

--

You received this message because you are subscribed to the Google Groups 
"DbLinq" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/dblinq?hl=en.


Reply via email to