Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Server Error with DELETE 2

Status
Not open for further replies.

scripter73

Programmer
Apr 18, 2001
421
US
Hi,
I'm trying to delete entries out of a SQL table called FACTOID. It has three fields:
- FactoidID (datatype 'int'; Identity=1)
- DataFact ('ntext')
- ShowDate ('datetime')

My .ASP file contains the SQL Delete code:

sqltext=&quot;DELETE from factoid where DataFact='<text value here>'&quot;
.....
set record_pointer=connection_var.execute(sqltext)


I get the following ERROR:
The text, ntext, and image data types cannot be used in the WHERE, HAVING, or ON clause, except with the LIKE or IS NULL predicates. I'm not exactly sure what this means. Is there a problem with my sql command or with how I defined my table columns?

Any help provided is much appreciated.

Thanks.
 
Can you use a varchar for DataFact rather than ntext?

You can't use WHERE on a nText type for some weird, technical (and probably bearded) reason.
 
Hey, hellferret,

Your suggestion was fabuloso!!!!

Worked lika charm.

Thanks,
scripter73
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top