Click here to Skip to main content
15,884,176 members
Home / Discussions / C#
   

C#

 
GeneralRe: Classes Pin
AnilUppala22-Jul-14 2:12
AnilUppala22-Jul-14 2:12 
QuestionHELP!!!! Pin
Member 1094467922-Jul-14 1:22
Member 1094467922-Jul-14 1:22 
AnswerRe: HELP!!!! Pin
Dave Kreskowiak22-Jul-14 2:16
mveDave Kreskowiak22-Jul-14 2:16 
SuggestionRe: HELP!!!! Pin
Richard Deeming22-Jul-14 2:18
mveRichard Deeming22-Jul-14 2:18 
AnswerRe: HELP!!!! Pin
OriginalGriff22-Jul-14 3:08
mveOriginalGriff22-Jul-14 3:08 
QuestionNo column found exception occourd Pin
vishavajeet21-Jul-14 1:56
vishavajeet21-Jul-14 1:56 
AnswerRe: No column found exception occourd Pin
Kornfeld Eliyahu Peter21-Jul-14 1:59
professionalKornfeld Eliyahu Peter21-Jul-14 1:59 
GeneralRe: No column found exception occourd Pin
vishavajeet21-Jul-14 2:06
vishavajeet21-Jul-14 2:06 
C#
string query = "SELECT A.emp_id, A.emp_first_name, A.emp_last_name, B.vehicle_no FROM (SELECT emp_id, emp_first_name, emp_last_name FROM emp_detail WHERE (emp_id = (SELECT emp_id FROM Tag_Assign WHERE(Tag_no =(select tag_no from tag_master where tag_id='" + textBox2.Text.Trim() + "'))))) AS A CROSS JOIN (SELECT emp_id, vehicle_no FROM Tag_Assign AS Tag_Assign_1 WHERE(Tag_no =(select tag_no from tag_master where tag_id='" + textBox2.Text.Trim() + "'))) AS B";

DataTable dt = con.datasource(query.Trim());

if (dt.Rows.Count > 0)
{
   lblEmp_name.Text = dt.Rows[0][1].ToString() + " " + dt.Rows[0][2].ToString();

   lblVehicle_no.Text = dt.Rows[0][3].ToString();
}



In above code it gives exception at dt.Rows[0][0].ToString();
AnswerRe: No column found exception occourd Pin
Kornfeld Eliyahu Peter21-Jul-14 2:21
professionalKornfeld Eliyahu Peter21-Jul-14 2:21 
GeneralRe: No column found exception occourd Pin
vishavajeet21-Jul-14 2:50
vishavajeet21-Jul-14 2:50 
AnswerRe: No column found exception occourd Pin
Kornfeld Eliyahu Peter21-Jul-14 2:51
professionalKornfeld Eliyahu Peter21-Jul-14 2:51 
GeneralRe: No column found exception occourd Pin
vishavajeet21-Jul-14 3:08
vishavajeet21-Jul-14 3:08 
GeneralRe: No column found exception occourd Pin
Eddy Vluggen21-Jul-14 3:02
professionalEddy Vluggen21-Jul-14 3:02 
SuggestionRe: No column found exception occourd Pin
Richard Deeming21-Jul-14 3:53
mveRichard Deeming21-Jul-14 3:53 
GeneralRe: No column found exception occourd Pin
vishavajeet21-Jul-14 23:34
vishavajeet21-Jul-14 23:34 
QuestionGiving input using App.config Pin
Mohan Subramani19-Jul-14 0:17
Mohan Subramani19-Jul-14 0:17 
AnswerRe: Giving input using App.config Pin
dan!sh 20-Jul-14 19:26
professional dan!sh 20-Jul-14 19:26 
QuestionVirtual Drive in c# Pin
Bikash Panigrahi18-Jul-14 19:31
Bikash Panigrahi18-Jul-14 19:31 
AnswerRe: Virtual Drive in c# Pin
OriginalGriff18-Jul-14 21:33
mveOriginalGriff18-Jul-14 21:33 
AnswerRe: Virtual Drive in c# Pin
Eddy Vluggen18-Jul-14 22:24
professionalEddy Vluggen18-Jul-14 22:24 
AnswerRe: Virtual Drive in c# Pin
Dilan Shaminda19-Jul-14 0:05
professionalDilan Shaminda19-Jul-14 0:05 
QuestionMapping a class to a table that has two primary keys Pin
Member 128472117-Jul-14 17:32
Member 128472117-Jul-14 17:32 
GeneralRe: Mapping a class to a table that has two primary keys Pin
PIEBALDconsult17-Jul-14 18:29
mvePIEBALDconsult17-Jul-14 18:29 
GeneralRe: Mapping a class to a table that has two primary keys Pin
Member 128472118-Jul-14 3:07
Member 128472118-Jul-14 3:07 
GeneralRe: Mapping a class to a table that has two primary keys Pin
Eddy Vluggen18-Jul-14 3:27
professionalEddy Vluggen18-Jul-14 3:27 

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.