﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » Business Objects and Data Access (How do I?)  » SQL Server Column Names</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Sat, 12 Sep 2026 17:38:52 GMT</lastBuildDate><ttl>20</ttl><item><title>SQL Server Column Names</title><link>http://forum.strataframe.net/FindPost24549.aspx</link><description>I am trying to build business objects for a thirdy party database where some of the column names contain a 'space' or a 'hyphen'.  &lt;br&gt;
&lt;br&gt;
Example:   'E-MailID' or 'Field Name'&lt;br&gt;
&lt;br&gt;
The mapper has no problem building the partial class for these fields but I guess these names are invalid in VB.&lt;br&gt;
&lt;br&gt;
Any suggestions on how to get around these issues and still be able to manage the database.  I can't change the field names - it's not my database.&lt;br&gt;
&lt;br&gt;
Thanks,&lt;br&gt;
Tim&lt;br&gt;</description><pubDate>Thu, 10 Sep 2009 05:05:44 GMT</pubDate><dc:creator>Tim Dol</dc:creator></item><item><title>RE: SQL Server Column Names</title><link>http://forum.strataframe.net/FindPost24598.aspx</link><description>Cool :cool:</description><pubDate>Thu, 10 Sep 2009 05:05:44 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: SQL Server Column Names</title><link>http://forum.strataframe.net/FindPost24591.aspx</link><description>Thanks guys, I went with the option of creating the structure in the toolkit and then using a SP to extract the data using Aliases for the problem fields.  Worked Perfectly.&lt;br&gt;
&lt;br&gt;
Thanks,&lt;br&gt;
Tim&lt;br&gt;</description><pubDate>Wed, 09 Sep 2009 17:12:31 GMT</pubDate><dc:creator>Tim Dol</dc:creator></item><item><title>RE: SQL Server Column Names</title><link>http://forum.strataframe.net/FindPost24578.aspx</link><description>The square bracket thing isn't going to work (just tried it..boom).  The issue with the custom properties is that the BO mapper will still map it incorrectly and anything I can think of fix that (like mapping to a dummy table) would break updates/inserts/deletes.  I guess you could NOT map it and custom write what you need (i.e. all the custom properties, figure out what in the designer file you'd need to replicate)...but that seem like a huge pain.&lt;br&gt;
&lt;br&gt;
If you have access to the database (i.e. you can add some other objects to it), you might consider a few things:&lt;br&gt;
&lt;br&gt;
- Dummy tables that you map against and then sprocs for inserts/updates/deletes.&lt;br&gt;
&lt;br&gt;
- You might have a "front-end" table that has an INSTEAD OF trigger, which in turn updates the actual table.&lt;br&gt;
&lt;br&gt;
- An updatable view that you'd map against and then would allow updates/inserts/deletes.&lt;br&gt;
&lt;br&gt;
Just throwing out some ideas. Not sure any fit your needs.</description><pubDate>Tue, 08 Sep 2009 15:03:06 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: SQL Server Column Names</title><link>http://forum.strataframe.net/FindPost24553.aspx</link><description>Actually this will most likely not work due to the compiler nature of .NET.&amp;nbsp; This violates basic compiler rules.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this case you may be required to create a custom property without the hyphen or space and then pull that value out of the data table.&amp;nbsp; The data table should hold the original column name since it is weak typed.</description><pubDate>Mon, 07 Sep 2009 10:55:15 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: SQL Server Column Names</title><link>http://forum.strataframe.net/FindPost24550.aspx</link><description>Hi Tim,&lt;br&gt;
&lt;br&gt;
You could try changing the designer code to enclose them in square brackets, e.g. [Field Name]&lt;br&gt;
&lt;br&gt;
Cheers, Peter</description><pubDate>Sun, 06 Sep 2009 02:26:50 GMT</pubDate><dc:creator>Peter Jones</dc:creator></item></channel></rss>