Not sure if this is the right forum to ask this, but here goes… is there a method for dynamically re-naming column names in a DataTable once it’s been filled?
TIA!
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Using DDL commands on a DataTable
There are system level stored procedures that will let you do that, but if you are contemplating doing that from ASP.NET there are all sorts of pitfalls unless that is the only user of the database. And there are some circumstances where the sprocs will fail – for example if a table is replicated. Give us a bit more detail as to what motivates the idea of changing column names and perhaps we can suggest alternatives.
basically the issue i am working is, to load a datable with default data or with edited data. once that’s done, the UI needs to display whichever set was loaded. since i use prefixes to define default data and edited data, when i try to assign controls to the data, if the prefix is for edit data, the system bombs. i thought to dynamically rename the column names but a better suggestion came up, which is to use the column number instead. so, no issue!
Thanks anyway
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.
Notifications