Solved

Why can I not get this mssql query to work?

Posted on 2007-11-28
7
412 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
mimic google as my ip 11 53
Blog posts not showing up on Blog page 7 51
Update database from a form 8 35
Please show me easiest post form. 3 31
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…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
The viewer will learn how to count occurrences of each item in an array.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

911 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

27 Experts available now in Live!

Get 1:1 Help Now