special character in an identifier

special character in an identifier

Post by Frank M?nik » Sat, 17 Mar 2001 07:36:40



I want read an Access2000-Table per SQL-Statement from a Server-Script
(ASP/PHP and ADO).
Unfortunately the identifier consists of one special character.

  $dbc = new COM("ADODB.Connection");
  $dbc->Provider = "MSDASQL";
  $dbc->Open(PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=xxx.mdb);
  rs = $dbc->Execute(sql, count);
with

   sql = "SELECT ID, Empf?nger FROM Warenempf?nger";

[ID]     [Empf?nger]
-------------------------
01      Hamburg
02      Mnchen
03      Karlsruhe

Is there a way, that Access-SQL read the right characters.

To built a string works only in a WHERE-Statement, e.g.
  'Empf' & CHR(228) & 'nger'

Bye!
Frank

 
 
 

special character in an identifier

Post by <JohnIo.. » Wed, 21 Mar 2001 08:43:09


Use the HTMLEncode method of the response object to display your special
strings.


Quote:> I want read an Access2000-Table per SQL-Statement from a Server-Script
> (ASP/PHP and ADO).
> Unfortunately the identifier consists of one special character.

>   $dbc = new COM("ADODB.Connection");
>   $dbc->Provider = "MSDASQL";
>   $dbc->Open(PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=xxx.mdb);
>   rs = $dbc->Execute(sql, count);
> with

>    sql = "SELECT ID, Empf?nger FROM Warenempf?nger";

> [ID]     [Empf?nger]
> -------------------------
> 01      Hamburg
> 02      Mnchen
> 03      Karlsruhe

> Is there a way, that Access-SQL read the right characters.

> To built a string works only in a WHERE-Statement, e.g.
>   'Empf' & CHR(228) & 'nger'

> Bye!
> Frank


 
 
 

1. special character in an identifier

I want to read an Access2000-Table per SQL-Statement from a
Server-Script (ASP/PHP).
Unfortunately the identifier consists of one special character.

  dbc = new COM("ADODB.Connection");
  dbc->Provider = "MSDASQL";
  dbc->Open(PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=xxx.mdb);
  rs = dbc->Execute(sql, count);
with

   sql = "SELECT ID, Empf?nger FROM Warenempf?nger";

[ID]     [Empf?nger]
-------------------------
01      Hamburg
02      Mnchen
03      Karlsruhe

Is there a way, that Access-SQL read the right characters.

To built a string works only in a WHERE-Statement, e.g.
  'Empf' & CHR(228) & 'nger'

Bye!
Frank

2. 2 sided VFP reports

3. quoted identifier for field names with special char in Access (through ODBC)

4. Transfer GUID via Stored Procedure

5. Identifiers max 18 character?

6. How can I avoid other users to run it, if the SP is running?

7. SQL find trouble with special characters

8. Worktable Using Clustered Index?

9. SQL Server and C++ Special Characters

10. BCP and special characters

11. Updating special characters in a database

12. Special Characters in Strings

13. Ignoring/escaping special characters in SQL