VB 2005 tableadapter select query columns out of sequence

Menthos

Well-known member
Joined
Jul 18, 2006
Messages
276
Programming Experience
10+
Hi...

I have a tableadapter filling a datatable using the following query:

VB.NET:
SELECT     Pos01, Pos02, Pos03, Pos04, Pos05, Pos06, Pos07, Pos08, Pos09, Pos10, Pos11, Pos12, Pos13, Pos14, Pos15, Pos16, Pos17, Pos18, Pos19, Pos20, Pos21, Pos22, Pos23, Pos24, Pos25, Pos26, Pos27, Pos28, Pos29, Pos30, Pos31, Pos32, Pos33, Pos34, Pos35, Pos36, Pos37, Pos38, Pos39, Pos40
FROM         mytable
WHERE     (Product = @Product) AND (customer = @customer)
However at runtime when I call the method to fill the table, the column Pos01 appears as the last column instead of the first.

Any ideas folks??
 
OK, sorted it out - for some reason the table had autogenerated the columns with the first column in the last position.

Deleted it and re-created it in the correct position and it's returning correctly now.

Cheers,
Menthos
 
Back
Top