Truncating Fields Error

Results 1 to 2 of 2

Thread: Truncating Fields Error

  1. #1
    s m Guest

    Default Truncating Fields Error

    I am getting an error with the following snippet of code. There was a suggestion in an earlier thread that this error was occurring because a certain field was being truncated in the database. One of the fields does actually contain large comments -- it could be 2 or 3 lines worth of characters. Would anyone have any suggestions on how we could fix the code to make it work? Thank you.<BR><BR>This is my code:<BR><BR>set conn = server.createobject("ADODB.Connection")<BR>conn.Op en "someDSN" <BR>Set rs = conn.Execute(stmt)<BR><BR>&#039; -- Display information&#039;<BR>Do While Not rs.EOF<BR>rs.Fields(0).Value<BR>rs.Fields(1).Value <BR>rs.Fields(2).Value<BR>rs.Fields(3).Value<BR>rs .Fields(4).Value<BR>rs.MoveNext<BR>Loop<BR><BR>&#0 39; -- Undefine data&#039;<BR>rs.Close<BR>Set rs = Nothing<BR>conn.Close <BR>Set conn = Nothing<BR><BR>This is the error:<BR><BR>Error Type:<BR>Microsoft OLE DB Provider for ODBC Drivers (0x8000FFFF)<BR>[Microsoft][ODBC Driver Manager] Data truncated<BR><BR>The error occurs at `Conn.Open "someDSN"<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Truncating Fields? I don't think so...

    If the error is occurring on the Conn.Open line, then you haven&#039;t even *gotten* to the point where you are trying to get data from the fields!<BR><BR>As a *hunch* (only), I&#039;d guess that maybe the open of the DB is discovering an error in the DB and is not returning the full set of info that the ODBC driver is expecting. If this is an access DB, try doing a "repair db" operation from Access. If a different kind of DB, do the equivalent.<BR><BR>But, again, I say it is just a hunch.<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