How To Localize Sql Message

  • Hi,

    I have a VB project which uses SQL Stored Procedure. All text strings in the project will be localized. While localization in VB is not a problem, I have no idea how to localize the Stored Proc's error message.

    All Stored Procs have an error handling mechanism and it raises an appropriate Sql Message for each error using code like this:

    IF @@ERROR <> 0

    GOTO Proc_Err

    ELSE

    RETURN 0

    Proc_Err:

    RAISERORR(50001,16,1,"Error occured..")

    How to localize the text string in the Message so it's in synch with the localized vb application.

    Thanks in advance for any help

    Regards,

    Hendry

  • noeld, the link you sent to me is broken. I got "Sorry, the page you requested is not available" from the site.

    I'm still curious with that link...

    Thanks,

    Hendry

  • I think the url should be http://support.microsoft.com/default.aspx?scid=kb;en-us;277535. If this link doesn't work you could allways look up KB277535 on MSDN.

    /Bard

  • Thanks Bard, That's what I'm looking for.

    Hendry

  • this query will get you the SP names which include a specific string in their code:

    select object_name(id) from syscomments

    where text like '%' + 'stringsearched' + '%' order by object_name(id)

    Hope it helps,

    Robin

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply