I am having table payroll_employee in which having(id,firstname,lastname,contact,email,address) these fields,but when i tried to retrieve data it comes in order(address,contact,email,firstname,id,lastname) i.e.in alphabetical order how to solve it
using oracle.
plz help ,
thank you.
Data coming in column name alphabetical order. How to resolve it?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Sukesh MarlaRank #461 · 5.4K reputationPosted Sep 11, 2012, 2:04 AM EDT
Use column Names explicity in Select query instead of *
as
Select id,firstname,lastname,contact,email,address From payroll_employee
Check this is correct answer if it helped
nallyaRank #8,588 · 219 reputationPosted Sep 11, 2012, 2:27 AM EDT
public List
{
var query = from payroll_employee in ent.PAYROLL_EMPLOYEE select payroll_employee;
//select new
//{
// EmpID=payroll_employee.EMPID,
// FirstName=payroll_employee.FIRSTNAME,
// LastName=payroll_employee.LASTNAME,
// ContactNo=payroll_employee.CONTACTNO,
// Email=payroll_employee.EMAIL,
// Address=payroll_employee.ADDRESS
//};
List
list = query.ToList();
return list;
}
IF I WRITE IN THE WAY U SAYING IT GIVES ERROR(CASTING)
I AM USING WCF SERVICE WITH ENTITY FRAMEWORK AND ORACLE DATABASE