All Forums Teradata Applications
Kahan 3 posts Joined 04/16
02 May 2016
TPT API buffer mode format??, indicate?? a few infomation....
        returnValue = conn->GetEvent(TD_Evt_BufferLayout, &dataptr, &datalen);
      if ( returnValue < TD_Error && returnValue != TD_Unavailable ){
          buffersize = *((int*)dataptr);
          rowheadersize = *((int*)(dataptr + sizeof(int)));
          rowlengthsize = *((int*)(dataptr+2*sizeof(int)));
          buftrailersize= *((int*)(dataptr+3*sizeof(int)));
          parcesize = rowheadersize - rowlengthsize;
            printf("buffer[%d], rowheader[%d], rowlength[%d], buffertrail[%d], parce[%d]\n",
                    buffersize, rowheadersize, rowlengthsize,buftrailersize,parcesize);
            

      }else {
          printf("[%d]TD_Evt_BufferLayout event failed with status \n",returnValue);
      }

        cout << "Driver Initiated with status " << returnValue << endl;
        char Buffer[buffersize];
        memset(Buffer, 0x00, buffersize);
        char data[50] ="aaaa,aaaaa,aaaaaa\n";
        unsigned short int rowleng = strlen(data);
        memcpy(Buffer+parcesize, &rowleng, sizeof(unsigned short int));
        memcpy(Buffer+rowheadersize, data, rowleng);

        returnValue = conn->PutBuffer(Buffer, (rowleng+buftrailersize),1);

I use TPT API Update Driver .
Use Buffer Mode
but all fail ......
Table_ET inserted Errorcode = 2673 ...
a few indicate infomation
tpt document sample ... not execute
help buffermode data format and example
 
 
 
 

You must sign in to leave a comment.