Diff for /sql/odbc/parser3odbc.C between versions 1.5 and 1.6

version 1.5, 2002/02/08 08:36:51 version 1.6, 2002/03/05 15:04:59
Line 169  public: Line 169  public:
                                                 for(int i=0; i<column_count; i++)                                               {                                                  for(int i=0; i<column_count; i++)                                               {
                                                         CString string;                                                          CString string;
                                                         rs.GetFieldValue(i, string);                                                          rs.GetFieldValue(i, string);
                                                         size_t size=string.GetLength();                                                          size_t size;
                                                         void *ptr=0;                                                          void *ptr;
                                                         if(size) {                                                          if(string.IsEmpty()) {
                                                                   ptr=0;
                                                                   size=0;
                                                           } else {
                                                                   const char *string_cstr=LPCTSTR(string);
                                                                   size=strlen(string_cstr); //string.GetLength() works wrong with non-string types: 
                                                                 ptr=services.malloc(size);                                                                  ptr=services.malloc(size);
                                                                 memcpy(ptr, (char *)LPCTSTR(string), size);                                                                  memcpy(ptr, string_cstr, size);
                                                         }                                                          }
                                                         handlers.add_row_cell(ptr, size);                                                          handlers.add_row_cell(ptr, size);
                                                 }                                                  }

Removed from v.1.5  
changed lines
  Added in v.1.6


E-mail: