Results 1 to 2 of 2

Thread: Getting NTEXT field from SQL7.0 to display

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2000
    Posts
    51

    Post

    Hi,

    I'm trying to get the NTEXT field from SQL7.0 to display on webpage with ADO, but I received the following error:
    Microsoft OLE DB Provider for ODBC Drivers error '80040e21'

    Errors occurred

    The following is my code:

    <%
    dim XSEL

    myDSN="DSN=INVENTORY;uid=xxx;pwd=xxx"
    set conntemp=server.createobject("adodb.connection")
    conntemp.open myDSN
    form_ID=Request.QueryString("which")

    sqltemp="select * from ProblemHistory where workstation_name = '"& form_ID &"'"
    set rstemp=conntemp.execute(sqltemp)

    USER1= rstemp("USER1")
    WRKS_NAME= rstemp("WORKSTATION_NAME")
    DATE1= rstemp("DATEOCCUR")
    DATE2= now()
    TROUBLESHOOT= rstemp("FIX_SOLUTION")
    PROBLEM = rstemp("problem1")
    TECH_NAME= rstemp("tech_admin")

    rstemp.close
    set rstemp=nothing
    conntemp.close
    set conntemp=nothing
    %>

    I was able to retrieve other field fine, except for PROBLEM field which is the ntext field in SQL.

    Thanks.


  2. #2
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844

    Post

    Hi Ptran

    I had no problem accessing an NTEXT field with ADO & SQL 7 just as you have....

    Try enumerating thru the errors collection to get more info:


    Dim I

    For I = 0 To cn.Errors.Count - 1
    response.write cn.Errors(I).Description
    Next


    [This message has been edited by Clunietp (edited 02-16-2000).]

Posting Permissions

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



Click Here to Expand Forum to Full Width