Audit fields

Feb 28, 2010 at 2:18 AM

Hi,

Even though audit fields Created_by, Created_date, Modified_by and Time_stamp are not visible in my wsgen designer, they are being pulled back from SQL Server into my collection result set.  Is this behaviour by design?.  If so it means that I have to list every field in a table specifically and am not able to perform a CustomersCollection.RunSelect()).

Thanks,

Rob

XPSP2, VS2008 Pro SP1, SQL Server 2008 Express, WPF Project.

 

 

Coordinator
Mar 1, 2010 at 2:40 AM

This is expected behavior. The audit fields are part of the table but you do not need to keep up with them. The created fields are set when a record is created and the modified fields are set when a record is modified. If you do not want audit fields simply turn them off on the table property designer. I do not understand what why you cannot execute "RunSelect". Please give further details. Do you get an error if so what? The audit fields come in and are managed for "free" so to speak. They keep up with your record so you do not have to. Please tell me what exactly breaks.

Mar 1, 2010 at 2:07 PM

Thanks for the response.  Nothing breaks and I didn't suggest that anything did.  Put simply, I wanted to use CustomersCollection.RunSelect() to pull back all the fields from the customer table as described/as the appear in the designer so that I could bind the result straight to a grid dynamically (on the shape of the result).  The audit fields do not appear in the designer so I did not expect them as part of my result and consequently in my grid.  The missunderstanding on my part was not knowing that the audit fields do not appear in the designer.  Thanks for making things clear.

Cheers,

Rob