On Tue, 2010-09-21 at 08:19 -0700, El wrote:
> I also corrected the casing and use u.Uid and U.Name.  For the select
> declaration, at least in Monodevelop, intellisense does not show the
> properties

So this is either a MonoDevelop code completion bug, or some other bug.
Thus, the real question is this: does the following compile?

> var users = from u in db.User select u;

If it compiles without error (which I fully expect it to), then the
problem isn't sqlmetal/Linq-to-DB/etc., it's MonoDevelop.  The fact that
this compiles but similarly doesn't show code completion:

> var users = from u in db.User select (new {UserId = u.Uid, FullName =
> u.Name});

further suggests that it's a MonoDevelop bug.

> Now it is complaining that I have
> an invalid connection string.  This is how I have it:
> 
> IDbConnection dbcon;
> dbcon = (IDbConnection) new SqliteConnection("Data Source=./
> MySampleDB.sq3; Version=3;");

The cast shouldn't be necessary, and I don't know why that would be
failing, though I see you later fixed it by using URI (which similarly
doesn't make sense...).  I know that Data Source works for me, though
I've never used Version, e.g. [0].

However, you're still missing the DbLinqProvider=Sqlite parameter, so
you should be doing:

        dbcon = new SqliteConnection (
            "URI=file:./MySampleDB.sq3;" +
            "Version=3;" +
            "DbLinqProvider=Sqlite"
        );

If you omit DbLinqProvider, then the DataContext will generate
MSSQL-style SQL, which DbLinq doesn't always like.

 - Jon

[0] http://www.jprl.com/Blog/archive/development/mono/2009/Mar-12.html


-- 
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