The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

Hi guys,

I'm making an application in VS 2008 and I have some problems with the LINQ to SQL.

I have a database and I want to take 1 value from it and display that in a messagebox.

This is my code

DataClasses1DataContext dc = new DataClasses1DataContext();

var RFID = "3973128c";
var query =
(from a in dc.GetTable<TERMINALUSER>()
select a);
var id =
(from c in query


But I can't get it to work, I can only show the entire line in a datagrid, but then it stops working.

Can any please help?