Jane Dallaway

Jane Dallaway

Jane Dallaway  //  Service Delivery manager, photographer, dog owner, gardener, reader, learner, software developer and occasional snowboarder

This blog contains all sorts of bits and bobs, from development related stuff, through process and productivity stuff, to photography stuff, and general inspiration things. It's a bit all over the place with no real theme, but then so am I

Email: jane @ dallaway.com
Also at:    

spu_generateInsert - handle unicode characters

I updated spu_generateinsert again today when one of my colleagues reminded me that I needed to prefix my strings with a capital N to ensure that any unicode values go into the database correctly.

So now instead of the call spu_generateinsert @table = 'LanguageData' producing
INSERT INTO [LanguageData] ([liID], [Value])VALUES (7,'D''Artagnan raconte qu''à sa première visite à')
it produces
INSERT INTO [LanguageData] ([liID], [Value])VALUES (7,N'D''Artagnan raconte qu''à sa première visite à')

As usual, the script is available here
And again as usual, leave me a comment if you think of some new functionality I should include, or any issues you come across.

0 comments

Leave a comment...