Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have a datatable that contains a calculated column in code. The way I save things to the databasse is abstracted. My code detects which columns have changed and creates an update command on the fly. The problem is I do NOT want to save the calculated column (it dosent exist in the database). Is there a way to detect if a column is a calculated column?

 

I thought of checking to see if its expression value had something in it, but im afraid other programmers using my SQL code would put expressions in columns that really do exist in the database.

 

The only other option I have is to read in the databases schema for the table and see if the column exists, but this requires a database hit, which I would rather avoid. Any help is appreciated.

 

Phylum

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...