Hi all. I'm experiencing a very weird situation regarding one of my SQL queries being fed into my C# app via a DataTable.
Short version is: I have a query which gathers information from two related tables, including the Autonumber ID of one table and the userdefined primary key of another. This is being imported as a designer DataTable.
I've set up an SQL Fill command which filters this DataTable based on the Autonumber field: WHERE ([Table 2].ID IN (x, y, z, ... etc)). This command is generated at runtime, fed into an OleDbDataAdapter, and then Fill is called on this Adapter.
What I'm getting is this: The correct records are displaying, but the Autonumber field is showing negative numbers and the other primary key isn't displaying at all.
The negative Autonumber thing isn't actually a problem, I'm hiding this column from the user anyway... but I need the primary key of the other table to be displayed.
Any suggestions? Thanks.
Qu.
"Why do all my attempts at science end with me getting punched by batman?" xkcd.