DBLibrary access varchar field larger than 255 bytes? 
Author Message
 DBLibrary access varchar field larger than 255 bytes?

Hi,
I've written a program in C, which fetch string from VarChar800) field,
using DBLibrary.
The problem is, I can only fetch 255 bytes , althrough the real data is
larger than 255. I found the 255 limitation is define in sqlfont.h
I wonder how SQL Server 7 itself can get the varchar data .
The following is my code, anyone who have done this before, please give me a
hint.
Thanks
Sidney Zhang

dbcmd (dbproc, "select varchardata from mytable ");
rc = dbsqlexec(dbproc);
rc = dbresults(dbproc);

 rc = dbbind ( dbproc, 1, VARYCHARBIND, (DBINT) 0,
(LPBYTE)&varchardatabuf );

 while (dbnextrow(dbproc) != NO_MORE_ROWS) {
    // process varchardatabuf
 }



Fri, 29 Nov 2002 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Edit text blocks larger than 255 bytes

2. writing 255 to a byte field becomes NULL in DAO

3. Is there way to call SNMP API with 255.255.255.255

4. Is there way to call SNMP API with 255.255.255.255

5. Is there way to call SNMP API with 255.255.255.255

6. Problem with SQL string larger than 255 items!

7. Storing more than 255 bytes in CString member of CRecordset

8. CDaoRecordset BYTE Field. Value of 255 Writes 0 to Access DB

9. Problem with SQL string larger than 255 items!

10. Can't get CFileDialog to get more than 255 bytes of file names

11. Greater than 255 fields

12. CRecordset: Acess memo field limited to 255 characters?

 

 
Powered by phpBB® Forum Software