Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

wwBusiness/wwSql - cSkipFieldsForUpdate

$
0
0
wwBusiness/wwSql - cSkipFieldsForUpdate
West Wind Client Tools
wwBusiness/wwSql - cSkipFieldsForUpdate
Jan. 26, 2013
09:46 am
3P90KY4DHShow this entire thread in new window
Gratar Image based on email address
From:Matt Slay
To:Rick Strahl
I've noticed that the property for cSkipFieldsForUpdates is sensitive to having spaces between the commas (it doesn't work properly if there are spaces after the commas separating each field name). I usually add spaces after commas when listing fields just to make the code a little cleaner to read.

So, I had this:

this.cSkipFieldsForUpdates = 'altpartno, before_qty_recd, vendor'

But is causes problems in building the Update sequence for Sql Server, as it does not seem to skip them due to that space and the test that it used to look for field names.

It wants this:

this.cSkipFieldsForUpdates = 'altpartno,before_qty_recd,vendor'

I think all it needs is some simple code to strip out all spaces from cSkipFieldsFromUpate or lcSkipFields, and it would then be tolerant of having spaces after the commas. It would then work either way.

Here's the code in wwSql.SqlBuildUpdateStatementFromObject() where I think the no-spaces-allowed coding is killing me:

FOR lnX=1 TO lnFields lcField = laFields[lnX]IF"," + UPPER(lcField) + "," $ lcSkipFieldsLOOPENDIF ...


Viewing all articles
Browse latest Browse all 10393

Trending Articles