Results 1 to 5 of 5

Thread: PHP, ODBC, and Unicode compatibilities...

  1. #1
    Registered
    Join Date
    Aug 2003
    Location
    Columbus, Ohio
    Posts
    122

    PHP, ODBC, and Unicode compatibilities...

    I have a MSSQL Server that I am accessing and I have come up with some errors. I actually have come up with some solutions too, but I'm not sure how to handle them.

    When running a simple query in PHP to the db (mssql_query (SELECT * FROM dbtable); ) I get the error "mssql_query(): message: Unicode data in a Unicode-only collation or ntext data cannot be sent to clients using DB-Library (such as ISQL) or ODBC version 3.7 or earlier. (severity 16)."

    I have done some research on this and from what I understand, I am using DBLIB or some older ODBC version that doesn't support Unicode. The only answer I have gotten so far is "You need to check your data access API from PHP, it's configuration etc." That would be nice if I knew what that meant. Is anyone familiar with this or how to remedy the problem? Might there be a way to get around the Unicode thing or have I run into a necessary upgrade?

    ERIC

  2. #2
    Administrator Chris's Avatar
    Join Date
    Feb 2003
    Location
    East Lansing, MI USA
    Posts
    7,048
    My guess is this is an issue of microsoft not playing well with others.

    Ever consider using a different database server?
    Chris Beasley - My Guide to Building a Successful Website[size=1]
    Content Sites: ABCDFGHIJKLMNOP|Forums: ABCD EF|Ecommerce: Swords Knives

  3. #3
    Registered
    Join Date
    Aug 2003
    Location
    Columbus, Ohio
    Posts
    122
    Actually, Chris, this is a job for work. I work for DoD so MSSQL is the only db server that is approved. I really should be using ASP and .Net stuff, but PHP is more universal and will allow me to correlate what I do at work and my personal website (besides the MSSQL thing). I think the language is far less convoluted too...let me know if you find anything, and in the meantime I will continue to bang my head against the wall!!!

  4. #4
    Administrator Chris's Avatar
    Join Date
    Feb 2003
    Location
    East Lansing, MI USA
    Posts
    7,048
    I really don't have any experience with using PHP with MS SQL, sorry I can't help.

    Try here:

    http://www.google.com/search?sourcei...age%3A+Unicode
    Chris Beasley - My Guide to Building a Successful Website[size=1]
    Content Sites: ABCDFGHIJKLMNOP|Forums: ABCD EF|Ecommerce: Swords Knives

  5. #5
    Registered
    Join Date
    Aug 2003
    Location
    Columbus, Ohio
    Posts
    122
    I haven't found a way to update MS's ODBC junk...even Server 2003 Enterprise has only version 3.6. The key was to check the field types of the existing DB that I was testing on. I had a "remarks" field that called for ntext data. The best bet in the situation that I came up with is to make the data fields strictly ANSI rather than trying to make both the server and client unicode-compatible. I changed the ntext field to text and I am returning a bunch of crap...but no PHP errors. Sorry to confuse everyone...

    ERIC

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •