Click here to Skip to main content
15,894,825 members
Home / Discussions / C#
   

C#

 
QuestionReading values from app.config file [modified] Pin
Tina_K7-Jul-08 20:48
Tina_K7-Jul-08 20:48 
AnswerRe: Reading values from app.config file Pin
Harvey Saayman7-Jul-08 20:58
Harvey Saayman7-Jul-08 20:58 
GeneralRe: Reading values from app.config file Pin
Tina_K8-Jul-08 13:22
Tina_K8-Jul-08 13:22 
QuestionReport viewer error Pin
csp7-Jul-08 20:38
csp7-Jul-08 20:38 
AnswerRe: Report viewer error Pin
Anu Palavila7-Jul-08 21:12
Anu Palavila7-Jul-08 21:12 
QuestionRemoting vs Sockets Pin
nr10002202027-Jul-08 20:22
nr10002202027-Jul-08 20:22 
AnswerRe: Remoting vs Sockets Pin
Rutvik Dave8-Jul-08 8:46
professionalRutvik Dave8-Jul-08 8:46 
QuestionI cant make a full dynamic query in LINQ Pin
mucahit7-Jul-08 20:15
mucahit7-Jul-08 20:15 
I cant make a full dynamic query in LINQ

I have 2 situation methods (only_exp_query, only_tbl_query) those are working.
...
using System.Linq.Dynamic;
using System.Data.Linq;
...
string connString = @"Data Source=.;Initial Catalog=Northwind;Integrated Security=True";
DataClasses1DataContext db = new DataClasses1DataContext(connString);
...
private void only_exp_query()
{
var query = db.Customers
.Where("City=@0", "LONDON")
.OrderBy("CompanyName");
dataGridView1.DataSource = query;
}

private void only_tbl_query()
{
Table<customer> _customer = db.Customers;
var query = from tbl in _customer
select tbl;
dataGridView1.DataSource = query;
}


But i want to run the script below , but it is not working...

private void full_query()
{
var query = db.GetTable("Customers")
.Where("City=@0", "LONDON")
.OrderBy("CompanyName");
dataGridView1.DataSource = query;
}

and then i can try this below script...

private void full_query()
{
Assembly asm = Assembly.GetAssembly(typeof(DataClasses1DataContext));

var query = db.GetTable(asm.GetType("Customer"));
.Where("City == @0 and Orders.Count >= @1", "London", 10)
.OrderBy("CompanyName, City")
.Select("New(CompanyName as Name, Phone)");
dataGridView1.DataSource = query;
}
but it returns the following error:
"ArgumentNullException was unhandled ,Value Cannot be null,Parameter Type"
but i dont know this error.


WHAT CAN I DO?
can you help me please
AnswerRe: I cant make a full dynamic query in LINQ Pin
leppie7-Jul-08 21:04
leppie7-Jul-08 21:04 
GeneralRe: I cant make a full dynamic query in LINQ Pin
mucahit7-Jul-08 22:04
mucahit7-Jul-08 22:04 
GeneralRe: I cant make a full dynamic query in LINQ Pin
mucahit7-Jul-08 23:05
mucahit7-Jul-08 23:05 
Questionsmart card Data Identification Pin
naveen20_57-Jul-08 18:52
naveen20_57-Jul-08 18:52 
QuestionProblems with generic list data structure Pin
sam L7-Jul-08 18:03
sam L7-Jul-08 18:03 
AnswerRe: Problems with generic list data structure Pin
leppie7-Jul-08 19:32
leppie7-Jul-08 19:32 
GeneralRe: Problems with generic list data structure Pin
sam L7-Jul-08 20:00
sam L7-Jul-08 20:00 
GeneralRe: Problems with generic list data structure Pin
leppie7-Jul-08 21:02
leppie7-Jul-08 21:02 
GeneralRe: Problems with generic list data structure Pin
sam L7-Jul-08 21:15
sam L7-Jul-08 21:15 
GeneralRe: Problems with generic list data structure Pin
leppie7-Jul-08 21:39
leppie7-Jul-08 21:39 
AnswerRe: Problems with generic list data structure Pin
dibya_20037-Jul-08 19:50
dibya_20037-Jul-08 19:50 
GeneralRe: Problems with generic list data structure Pin
leppie7-Jul-08 21:00
leppie7-Jul-08 21:00 
AnswerRe: Problems with generic list data structure Pin
N a v a n e e t h7-Jul-08 21:32
N a v a n e e t h7-Jul-08 21:32 
QuestionSetup and deployment for windows application Pin
vishnukamath7-Jul-08 18:03
vishnukamath7-Jul-08 18:03 
AnswerRe: Setup and deployment for windows application Pin
Rutvik Dave8-Jul-08 8:56
professionalRutvik Dave8-Jul-08 8:56 
QuestionPerformance Related bug in C# code Pin
Tina P7-Jul-08 17:56
Tina P7-Jul-08 17:56 
AnswerRe: Performance Related bug in C# code Pin
Ashfield7-Jul-08 21:09
Ashfield7-Jul-08 21:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.