Home Products Downloads Purchase Support News Members Company
SITE FEED
Support Forum
The fastest and most effective to get answers to your questions quickly. Click Here for more info.
FAQs
Quick answers to common questions. Click Here for more info.
Troubleshooting
Known issues and basic troubleshooting techniques for problems or unexpected behaviors. Click Here for more info.
Knowledgebase
Technical tips, How-to articles, and other tutorials about ApexSQL Tools. Click Here for more info.
Online Documentation
All of our help files for download or convenient viewing online. Click Here for more info.
Videos
Watch product demos, training videos, or tutorials of our products' main features.  We frequently upload new videos so check often for updates. Click Here for more info.

Troubleshooting

Troubleshooting and Known issues with Apex SQL Tools


Some of my SQL objects have multiple words in their names (for example, [Order Details]) and this causes the errors when they are used as...

Some of my SQL objects have multiple words in their names (for example, [Order Details]) and this causes the errors when they are used as method names?

CAUSE

Database object names like [Order Details] not valid for identifiers in programming languages.

RESOLUTION

Write your own function to convert names or define aliases (see help here: http://www.apexsql.com/help/apexsqlcode/HTML/Support/_FAQs.htm#How_do_I_change_an_Alias_of_an_Object_) for the objects and use alias in your templates. For example, take the following function MakeValidFilename (VB.Net) as the base:
Function MakeValidFilename(vString As String) As String
Dim strChar As String
Dim IllegalChars(14) As String
IllegalChars =
New String() {"\","/",":","*","""","<",">","|","$", " ", "%", "(", ")", "-"}
For Each strChar In IllegalChars
vString = Replace(vString, strChar,
"_")
Next
MakeValidFilename = vString
End Function

And call it in proper cases
Public Interface I<%= MakeValidFilename(objTable.Name) %>

For the Order Details table it writes
Public Interface IOrder_Details

LAST REVIEW DATE
10 August 2007

Labels:



© 2008 Apex SQL Tools All Rights Reserved | 1.919.968.8444 | Contact Us | Terms of Use | Privacy Policy