Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Query to Pervasive linked server with special character in tablename Expand / Collapse
Author
Message
Posted Wednesday, December 30, 2009 7:38 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, July 11, 2012 6:23 AM
Points: 8, Visits: 38
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
Post #840319
Posted Wednesday, December 30, 2009 7:44 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Thursday, April 10, 2014 3:12 PM
Points: 2,132, Visits: 3,399
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.
Post #840324
Posted Wednesday, December 30, 2009 7:48 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, July 11, 2012 6:23 AM
Points: 8, Visits: 38
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.....
Post #840328
Posted Wednesday, December 30, 2009 8:11 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Thursday, April 10, 2014 3:12 PM
Points: 2,132, Visits: 3,399
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!
Post #840346
Posted Wednesday, December 30, 2009 8:23 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Tuesday, March 04, 2014 7:44 AM
Points: 1,421, Visits: 3,220
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.
Post #840357
Posted Wednesday, December 30, 2009 8:37 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, July 11, 2012 6:23 AM
Points: 8, Visits: 38
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.
Post #840374
Posted Wednesday, December 30, 2009 8:48 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Thursday, April 10, 2014 3:12 PM
Points: 2,132, Visits: 3,399
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!!!
Post #840387
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse