Data type problem

Results 1 to 2 of 2

Thread: Data type problem

  1. #1
    Join Date
    Dec 1969

    Default Data type problem

    *<BR>I am integrating an ASP site with a 4th Dimension (4D) database, and I&#039m having trouble getting one type of data (Text) to display. The documentation for the ODBC driver maps 4D&#039s Text type to SQL_LONGVARCHAR, and the type property of ADO&#039s Field object does indeed identify it as adLongVarChar (that is, after executing a query and creating a RecordSet, RS("theTextField").Type returns 201 or adLongVarChar). But VBScript doesn&#039t recognize it - VarType(RS("theTextField")) returns VBNull instead of VBString, and IsNull(RS("theTextField")) returns True. When I try to display the field on a web page, it appears as an empty string (despite the fact that there is data in the field), but produces no error message.<BR><BR>When I created an analogous database in SQL Server (6.5), SQL Server&#039s Text type (which also maps to SQL_LONGVARCHAR and adLongVarChar) works better, but still not as I&#039d expect: in some cases the field&#039s value is accessible, but VBScript still considers it null.<BR><BR>When I try to access all other data types, they work as I expect them to. Why doesn&#039t SQL_LONGVARCHAR map to VBString, like SQL_VARCHAR does? Why would it behave differently with two different databases, if the ADO data type is recognized as the same? Most importantly, how can I access the data stored in that Text field?<BR><BR>Thanks in advance,<BR><BR>Ben<BR><BR>

  2. #2
    Leungas Guest

    Default RE: Data type problem

    VB Recognise text as Variant no VBString, since VBString have a lenght limitation. <BR><BR>Hope this helps

Posting Permissions

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