Data Type

Results 1 to 2 of 2

Thread: Data Type

  1. #1
    Join Date
    Dec 1969

    Default Data Type

    Ok, this is my second post regarding data types, so thanks in advance.<BR><BR>This is an error I&#039;m getting on a code written for a SQL db.<BR>[Microsoft][ODBC SQL Server Driver][SQL Server]The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator. <BR><BR>/today.asp, line 17 <BR><BR>here&#039;s the coding<BR>strsql="SELECT * from tracking where datereceived = &#039;" & date() & "&#039;"<BR>Set rs = Server.CreateObject ("ADODB.Recordset") <BR> strsql, canvasDB, adOpenStatic, adLockReadOnly, adCmdText<BR><BR>is date() the problem?

  2. #2
    Join Date
    Dec 1969

    Default So what *IS* the datatype...

    ...of your datereceived field???<BR><BR>It looks like SQL Server is telling you that it&#039;s a text or ntext type. Obviously it should be a DATETIME type.<BR><BR>No, DATE() shouldn&#039;t be the problem. Would be nice, though, if you debugged:<BR> Response.Write "DEBUG: " & strsql & "&#060;HR&#062;"<BR>just before the RS.OPEN line.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts