Really lost in CRecordset 
Author Message
 Really lost in CRecordset

Hi,

I am using Bulk transfer.

Whenever I use SetRowsetSize() and set the rowset to more than 24 (25 is
the default), it will throw an exception and says that the Data is
Truncated!

I have tried UserAllocate all the required memory but then it still
shows the same symptum. :(

Can anyone help please.

Thanks
Regards
Kwan.



Sat, 25 Oct 2003 16:50:37 GMT  
 Really lost in CRecordset
I think you will find that this is not due to setting the RowsetSize. It is
more likely to be that a bound column is being forced into a variable that
is too small for it eg. You're retrieving a TEXT(300) field into a CString
which by default is a maximum of 255 characters.


Quote:
> Hi,

> I am using Bulk transfer.

> Whenever I use SetRowsetSize() and set the rowset to more than 24 (25 is
> the default), it will throw an exception and says that the Data is
> Truncated!

> I have tried UserAllocate all the required memory but then it still
> shows the same symptum. :(

> Can anyone help please.

> Thanks
> Regards
> Kwan.



Sat, 25 Oct 2003 17:09:25 GMT  
 Really lost in CRecordset
I have been asking this questions for a few days, and finally I solved it!

The answer is ...... LPSTR is NULL Terminated. When your DB is reporting a
Text field which is 16 char long, your RFX_TEXT_BULK transfer has to be 17
:(

Regards
Kwan.

Quote:

> Hi,

> I am using Bulk transfer.

> Whenever I use SetRowsetSize() and set the rowset to more than 24 (25 is
> the default), it will throw an exception and says that the Data is
> Truncated!

> I have tried UserAllocate all the required memory but then it still
> shows the same symptum. :(

> Can anyone help please.

> Thanks
> Regards
> Kwan.



Sat, 25 Oct 2003 17:08:00 GMT  
 Really lost in CRecordset
Thanks a lot Robert :)

This is very close to my problem. I just didn't know that RFX_TEXT_BULK need an
exra Null Termination at the end of the stirng. :)

Anywa, thanks and regards, Kwan.

Quote:

> I think you will find that this is not due to setting the RowsetSize. It is
> more likely to be that a bound column is being forced into a variable that
> is too small for it eg. You're retrieving a TEXT(300) field into a CString
> which by default is a maximum of 255 characters.



Sun, 26 Oct 2003 09:53:47 GMT  
 Really lost in CRecordset
I remember trying to get bulk transfer working and I did get it working
rather well. I also remember discovering surprises such as that. Sometimes
it is necessary to struggle with such things for a while to figure things
out. The documentation could be and should be better.


Quote:
> I have been asking this questions for a few days, and finally I solved it!

> The answer is ...... LPSTR is NULL Terminated. When your DB is reporting a
> Text field which is 16 char long, your RFX_TEXT_BULK transfer has to be 17
> :(

> Regards
> Kwan.


> > Hi,

> > I am using Bulk transfer.

> > Whenever I use SetRowsetSize() and set the rowset to more than 24 (25 is
> > the default), it will throw an exception and says that the Data is
> > Truncated!

> > I have tried UserAllocate all the required memory but then it still
> > shows the same symptum. :(

> > Can anyone help please.

> > Thanks
> > Regards
> > Kwan.



Sun, 26 Oct 2003 14:19:26 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. You know you're really lost...

2. Q: CRecordSet::Delete() doesn't really delete??

3. CRecordset: is it really useful?

4. Q: CRecordSet::Delete() doesn't really delete??

5. really really dumb question

6. I really really want to turn off warnings in eVC4 SP1

7. Losing focus LOSES BTN_CLICKED events!

8. Lost Data Exchange Control->Now losing sanity :-)

9. I'm really, really, really new at this.

10. Using CRecordset::AddNew() and CRecordset::Edit() with IDENTITY fields

11. Is STL really list really better than good old linked lists?

12. (void*)0 or NULL -- no really, this is a C# Q

 

 
Powered by phpBB® Forum Software