all groups > sql server full text search > august 2004 >
You're in the

sql server full text search

group:

Error message in wrong language?


Error message in wrong language? charles
8/20/2004 2:31:59 PM
sql server full text search:
I want to give users access to full-text searching and presume that I can
let SQL-server do all the dirty work. If I pass in a syntax error, things
fail as expected and I get an appropriate error message in the exception.

If I pass in a query with only "a" (for example) with only ignored words,
the exception is thrown with an error message in Spanish!

"Una proposizione della query conteneva solo parole ignorate."

Since syntax errors on the same stored procedure come back in English, I
assume my culture is correct (and I set it explicitly). If call the stored
procedure from DevStudio with the same params, the error message is in
English.

Any ideas?

thanks
charles

DETAILS:
The stored procedure:
ALTER PROCEDURE dbo.GetMessageList

(

@ForumID int,

@FullTextSearch nvarchar(200)='',

@BeginDate DateTime=NULL,

@EndDate DateTime=NULL,

@IsModerator bit=0

)

AS

SELECT
ForumMessages.ID,Title,MessageBody,Format,Locked,Importance,Hidden,PostTime,
UpdateTime,EventDate,Alias,Views,

(SELECT COUNT(ID) FROM ForumMessages AS F1 WHERE
ForumMessages.ID=F1.RootParentID) AS Replies

FROM ForumMessages, ForumUsers

WHERE

ParentID IS NULL AND

ForumID=@ForumID AND

(@IsModerator=0 OR Hidden=0) AND

(@BeginDate IS NULL OR EventDate>=@BeginDate) AND

(@EndDate IS NULL OR EventDate<=@EndDate) AND

ForumUsers.ID=UserID AND

(@FullTextSearch='' OR ForumMessages.ID IN

(SELECT RootParentID FROM ForumMessages WHERE
CONTAINS(Title,@FullTextSearch) OR CONTAINS(MessageBody,@FullTextSearch)

)

OR ForumMessages.ID IN

(SELECT ID FROM ForumMessages WHERE CONTAINS(Title,@FullTextSearch) OR
CONTAINS(MessageBody,@FullTextSearch)

)

)

ORDER BY Importance DESC,UpdateTime DESC

RETURN

Re: Error message in wrong language? Hilary Cotter
8/20/2004 10:43:35 PM
are you getting this message in Query Analyzer? If so which language is it
being returned in?

Are you getting it in ADO? If so, what is your localeID, and what are your
regional settings (check control panel for this).

--
Hilary Cotter
Looking for a book on SQL Server replication?
http://www.nwsu.com/0974973602.html


[quoted text, click to view]

Re: Error message in wrong language? charles
8/23/2004 9:00:10 AM
With Query analyser the error comes back in English. Don't know about ADO,
my app is in C# and uses the SqlClient calls. But I've only found this one
message in Spanish. Does the Full-text system have a separate language
configuration entry? Also, my App is multilingual, when a user selects a
different language, how will I tell SQL-Server what language should be used
for error messages?

thanks
charles


[quoted text, click to view]

Re: Error message in wrong language? charles
8/24/2004 10:35:29 AM
I added an explicit SET LANGUAGE to my sp and the problem is corrected.
charles

[quoted text, click to view]

AddThis Social Bookmark Button