Wayne Barron
asked on
'80040e14' The text, ntext, or image data type cannot be selected as DISTINCT. (None of the Fields Are?)
Hello All;
I receive the following error through my ASP page.
========================== ========== ==========
Microsoft OLE DB Provider for SQL Server error '80040e14'
The text, ntext, or image data type cannot be selected as DISTINCT.
/BS/Connections/i_utils.as p, line 51
========================== ========== ==========
This is the code:
========================== ========== ==========
==============
sSQL = "SELECT distinct A.*, B.CatID, B.Cat, " & _
" (SELECT COUNT(1) FROM Cats WHERE A.CatTypeID=Cats.CatTypeID ) AS ParentCount, " & _
" (SELECT COUNT(1) FROM Content WHERE B.CatID=Content.CatID) AS ChildCount " & _
" FROM (CatTypes A LEFT JOIN Cats B ON A.CatTypeID = B.CatTypeID) " & _
" LEFT JOIN Content C on B.CatID = C.CatID "
Srs.Open sSQL, Bconn, 1, 3, 1 ' Line 51 is here
==============
========================== ========== ==========
The FieldName and Data Types are:
CatID = bigint
CatTypeID = int
Cat = varchar
=======
As you can see, none of the Field's Data Types are of "text, ntext (or) Image"
Any idea's on this one?
Thanks All;
Carrzkiss
I receive the following error through my ASP page.
==========================
Microsoft OLE DB Provider for SQL Server error '80040e14'
The text, ntext, or image data type cannot be selected as DISTINCT.
/BS/Connections/i_utils.as
==========================
This is the code:
==========================
==============
sSQL = "SELECT distinct A.*, B.CatID, B.Cat, " & _
" (SELECT COUNT(1) FROM Cats WHERE A.CatTypeID=Cats.CatTypeID
" (SELECT COUNT(1) FROM Content WHERE B.CatID=Content.CatID) AS ChildCount " & _
" FROM (CatTypes A LEFT JOIN Cats B ON A.CatTypeID = B.CatTypeID) " & _
" LEFT JOIN Content C on B.CatID = C.CatID "
Srs.Open sSQL, Bconn, 1, 3, 1 ' Line 51 is here
==============
==========================
The FieldName and Data Types are:
CatID = bigint
CatTypeID = int
Cat = varchar
=======
As you can see, none of the Field's Data Types are of "text, ntext (or) Image"
Any idea's on this one?
Thanks All;
Carrzkiss
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
script your CatTypes table and show it here. I bet you will see the column right there.
ASKER
Oh man. That was sweet.
So it was looking at the entire Table of CatTypes. since it was the a.*
I will be darn,
Thanks a bunch.
It was the
CatType - text
I changed it to:
CatType - varchar.
You rock.
Thanks you
Wayne
So it was looking at the entire Table of CatTypes. since it was the a.*
I will be darn,
Thanks a bunch.
It was the
CatType - text
I changed it to:
CatType - varchar.
You rock.
Thanks you
Wayne