Query to Pervasive linked server with special character in tablename

  • Hi *all

    We have the following situation:

    - SQL Server 2008 (German Version)

    - linked Server to Pervasive database

    The linked server performs not very fast, but is stable and working.

    On this server somebody created a view with a special character 'Ä'. In object explorer this character is shown as a questionmark '?'.

    If i query the view exactly how it is shown in object explorer the following errors appeared:

    (sorry server in German, setup of this server was not by me.....)

    Der OLE DB-Anbieter 'MSDASQL' für den Verbindungsserver 'xxxx' hat die Meldung '[Pervasive][ODBC Client Interface][LNA][Pervasive][ODBC Engine Interface][Data Record Manager]No such table or object.' zurückgeben.

    Der OLE DB-Anbieter 'MSDASQL' für den Verbindungsserver 'xxxx' hat die Meldung '[Pervasive][ODBC Client Interface][LNA][Pervasive][ODBC Engine Interface]Unable to open table: bla?bla.' zurückgeben.

    Meldung 7321, Ebene 16, Status 2, Zeile 2

    Fehler beim Vorbereiten der 'SELECT

    *

    FROM "bla?bla"

    '-Abfrage zur Ausführung für den OLE DB-Anbieter 'MSDASQL' für den Verbindungsserver 'xxxxx'.

    Does anybody have an idea how this view can be accessed with an escape character ?

    All other tables work well.

    A sample query looks like this and works:

    SELECT * FROM OPENQUERY(LinkedServer,

    'SELECT

    *

    FROM "customers"

    ')

    Thanks for any tips.

    Have a good time and all the best for the new year.

    Regards,

    Marc

  • Ach du Lieber, ich habe meine Deutsch nicht üben! (I hope I said that right!)

    Off the top of my head, I'd suggest checking the collation settings.

    +--------------------------------------------------------------------------------------+
    Check out my blog at https://pianorayk.wordpress.com/

  • Hello Ray K

    I think there is all OK with the collation.

    The problem ist only with this single view and this character.

    I thought there is an option with something like an escape character where it would be possible to pass the special character as hex or decimal.

    btw: Your german can be understood.....

  • Hmmm . . . there's a function called CHAR that might be what you're asking about. (Not sure if this is what you need, but what the heck.)

    What it does is it takes a number representing an ASCII value and converts it to a character. For example, "select char(35)" gives you "#". Take a look at it in BOL (Books Online) and see if it's what you need.

    I took three years of German in high school (Gymnasium) and one semester of German in college (Universität). It's been a long time since I practiced it!

    +--------------------------------------------------------------------------------------+
    Check out my blog at https://pianorayk.wordpress.com/

  • I think I would create a new view that does not have that character in it.

    The '?' means it is a unicode character that can't be displayed in the current code page.

    The probability of survival is inversely proportional to the angle of arrival.

  • Thank You for the answers.

    Yes it would be the simplest solution to create a new view.

    A consultant programmed this view. I have no access to this.

    First i wish i could tear the ears of this programmer as long as Mr. Spock's ears.....

    Will try with the "CHAR" option, maybe a statement can be prepared.

  • polarbear101 (12/30/2009)


    First i wish i could tear the ears of this programmer as long as Mr. Spock's ears.....

    LOL!!!!!!!!!!!!!!!!

    I suspect there are many people (myself included) who share your sentiment!!!

    +--------------------------------------------------------------------------------------+
    Check out my blog at https://pianorayk.wordpress.com/

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

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