C# and DLINQ

THT

THT

Associate
Joined
10 Mar 2004
Posts
998
Anyone had much luck with this?

The actually mapped linked stuff is fine.
Im struggling with an "Old fashioned SQL" statement using ExecuteQuery()

Code:
 String FieldList = db.ExecuteQuery<String>("select FieldList from Table where SearchId = 15").Single();
            String WhereClause = db.ExecuteQuery<String>("select WhereClause from Table where SearchId = 15").Single();

            String sql = "select " + FieldList + " from Table2 where " + WhereClause;
            
            
            var a = db.ExecuteQuery(sql).ToList(); [COLOR="Red"] <--FAILS HERE[/COLOR]

It wants me to type the return, but i dont know the type, as its a dynamically created query.....
 
Yeah I tried Object already.

The problem is because the data is coming from multiple tables, I cant Strongly Type it with <TableName>
You are right, becuase ive been using DLINQ elsewhere in the project, i was trying not to mix technologies.

Ill be using OleDB for this

Thanks
 
Back
Top Bottom