November 17, 2005 at 8:55 am
I have a memo/text field in one of my tables that was used as part of an input form. Now I'd like to spell check the field for any spelling errors. Is there a way do that in SQLServer?
Jacqueline
November 18, 2005 at 6:51 am
Not sure about spell checking from Transact-SQL, but for use with applications and servers at the time of data entry, check out http://www.wintertree-software.com/
November 18, 2005 at 7:06 am
Not sure this is what you are looking for ... but we use "VSSPELL" (an ActiveX control) from ComponentOne in our client application that allows our users to run spell check on the data that our users enter into our text fields.
Norene Malaney
November 18, 2005 at 8:20 am
Try this. You'll need Word installed on the machine you're running this on. It works but it's [slow].
Cheers,
Ken
CREATE FUNCTION dbo.CheckSpelling (@checkword VARCHAR(50))
RETURNS BIT AS
BEGIN
DECLARE @w INT,
@s-2 BIT,
@t INT
EXEC sp_OACreate 'Word.Application', @w OUTPUT
EXEC sp_OAMethod @w, 'Documents.Add', @t OUTPUT
EXEC sp_OAMethod @w, 'CheckSpelling', @s-2 OUTPUT, @checkword, '', TRUE
EXEC sp_OAMethod @w, 'Quit'
EXEC sp_OADestroy @w
RETURN @s-2
END
November 18, 2005 at 8:24 am
OK. I'm an idiot. I forgot to put in example usage.
select dbo.checkspelling('blah') -- Returns 1 (success)
select dbo.checkspelling('blahh') -- Returns 0 (failure)
Sorry 'bout that...
Ken
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply