[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freetds
Subject:    [freetds] Still problems with text fields?
From:       Don Burden <donb () zirmed ! com>
Date:       2002-07-25 15:24:17
[Download RAW message or body]

Is there still a bug with length of text fields or am I doing anything
wrong?

Using yesterdays nightly build of freeTDS.  Accessing SQL2000 database.
Here's my code:

  .....
  SQLAllocHandle(SQL_HANDLE_STMT, hdbc, &hstmt);
  SQLBindCol(hstmt, 1, SQL_C_CHAR, sCol1, -1, &cbCol1);
  SQLExecDirect(hstmt, "SELECT id FROM TEST", SQL_NTS);
  while(SQLFetch(hstmt)==0)
    fprintf(stdout, "%s\n", sCol1);
  .....

Here is the TEST table:

id
======
12345
123456
1234567
123456
12345

If id field is defined as varchar, output is ok:

12345
123456
1234567
123456
12345

If id field is defined as text, output is like this:

12345
12345
1234567@
1234567@
1234567@

---
You are currently subscribed to freetds as: [freetds@progressive-comp.com]
To unsubscribe, forward this message to leave-freetds-113879Q@franklin.oit.unc.edu
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic