Hi,
I am trying to get linq to sql functionality running as part of a
larger project to reimplement an existing web application using open
source software that currently runs under a Microsoft stack (using
IIS, ASP.Net, Windows Server 2008 and MS SQL).
I am using PostgreSql (on OpenSuse 11.2) for my data base and Mono 2.6
(which utilizes DBLinq to Provide the linq to sql functionality). I
can successfully connect to the database and retrieve records by
executing queries via the data context. IE:
var dc = new DataContext(new NpgsqlConnection (connectionString));
foreach(Course course in dc.ExecuteQuery<Course>("Select * From
Course;"))
{
Console.WriteLine (course.courseName);
}
successfully prints out the names of the courses stored in the
database.
However I cannot access the same data using the GetTable method:
foreach(Course course in dc.GetTable<Course>())
{
Console.WriteLine (course.courseName);
}
which yields:
Unhandled Exception: Npgsql.NpgsqlException:
syntax error at or near "["
Severity: ERROR
Code: 42601
at Npgsql.NpgsqlConnector.CheckErrors () [0x00027] in /usr/src/
packages/BUILD/mono-2.6.1/mcs/class/Npgsql/Npgsql/NpgsqlConnector.cs:
361
Having had a look around, the biggest clue I have found is that
implementations not based on Mono 2.6, (IE using Dblinq directly) use
an assembly: DbLinq.Postgres.dll. My project currently references
Npgsql, System, System.Core, System.Data, and System.Data.Linq. Is
DbLinq.Postgres.dll missing from the Mono implementation? Do I need
to obtain this separately?
Thanks so much for any help you can provide.
Regards,
Neil
--
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.