Solved

Why can I not get this mssql query to work?

Posted on 2007-11-28
7
445 Views
Last Modified: 2012-08-14
I am getting this error below and wonder why and how to fix it can someone help please.
Warning: mssql_query() [function.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) in admin\closecase.php on line 25

Warning: mssql_query() [function.mssql-query]: Query failed in admin\closecase.php on line 25

Here is my code for that query from line 20- 25
$viewMyCasesII = mssql_query("SELECT     caseID, customerEmail, SysName, problemDescription, SysLoc, SysType, customerPhone, SRDATETIMESTAMP, Owner, OwnDept, CaseState,
                      chowned, submitTime
FROM         dbo.caseData
WHERE     (Owner = '$STAFFNAME') AND (CaseState = 'OPEN')
ORDER BY caseID");
0
Comment
Question by:lhaluska
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 11

Expert Comment

by:jgordos
ID: 20367978
Change your column type from NTEXT to Text
0
 
LVL 11

Expert Comment

by:jgordos
ID: 20367985
i'm an idiot, i'm thinking 'nvarchar' in my head, and thinking 'text'.  change to varchar
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:lhaluska
ID: 20368070
Will I have to do this to every "nvarchar,ntext, nvar, and nchar'?
0
 
LVL 1

Author Comment

by:lhaluska
ID: 20368135
Oh and can I just change all of my columns in my table from "ntext" to just the 'text' if it has no unicode like foreign language text?
0
 
LVL 21

Accepted Solution

by:
nizsmo earned 500 total points
ID: 20368153
ntext is for if you have unicode characters, you can use text if you have no unicode characters, you should be fine with just the english characters.
0
 
LVL 1

Author Comment

by:lhaluska
ID: 20368182
Thank you the help and for explaining my problem.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question