Solved

Why can I not get this mssql query to work?

Posted on 2007-11-28
7
401 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
  • 3
  • 2
  • 2
7 Comments
 
LVL 21

Expert Comment

by:nizsmo
ID: 20367777
0
 
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
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…
The viewer will learn how to count occurrences of each item in an array.

708 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now