SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Query to Pervasive linked server with special character in tablename


Query to Pervasive linked server with special character in tablename

Author
Message
polarbear101
polarbear101
Forum Newbie
Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)

Group: General Forum Members
Points: 8 Visits: 39
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
Ray K
Ray K
Hall of Fame
Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)

Group: General Forum Members
Points: 3767 Visits: 4645
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/
polarbear101
polarbear101
Forum Newbie
Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)

Group: General Forum Members
Points: 8 Visits: 39
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.....
Ray K
Ray K
Hall of Fame
Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)

Group: General Forum Members
Points: 3767 Visits: 4645
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/
sturner
sturner
SSCrazy
SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)

Group: General Forum Members
Points: 2218 Visits: 3259
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.
polarbear101
polarbear101
Forum Newbie
Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)

Group: General Forum Members
Points: 8 Visits: 39
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.
Ray K
Ray K
Hall of Fame
Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)

Group: General Forum Members
Points: 3767 Visits: 4645
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/
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search