Solved

Why can I not get this mssql query to work?

Posted on 2007-11-28
7
422 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 our DevOps Team Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

 
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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

This article will explain how to display the first page of your Microsoft Word documents (e.g. .doc, .docx, etc...) as images in a web page programatically. I have scoured the web on a way to do this unsuccessfully. The goal is to produce something …
Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

825 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