![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
The problem is that - if I understood things correctly - I can only define a BLOB as a std::string. And when I execute my query and try to access the data in the BLOB, it stops after the first hex 00 (which is "normal" since it's a string). Problem is that even if I access the data() member of the string, I only get the bytes till the first 00. |
#3
| |||
| |||
|
|
On Mon, Nov 28, 2005 at 12:38:08AM +0100, Viktor STARK wrote: The problem is that - if I understood things correctly - I can only define a BLOB as a std::string. And when I execute my query and try to access the data in the BLOB, it stops after the first hex 00 (which is "normal" since it's a string). Problem is that even if I access the data() member of the string, I only get the bytes till the first 00. Just to make sure, you've checked the size() of the string, right? I have a bad feeling that somewhere the data is being assigned with operator=(), but I don't know for sure. This would take some time, delving into custom.pl. |
#4
| |||
| |||
|
|
The problem is that - if I understood things correctly - I can only define a BLOB as a std::string. And when I execute my query and try to access the data in the BLOB, it stops after the first hex 00 |
|
Hope I'm just missing something obvious and I'll be able to use SSQLS since that feature really *rocks*. |
#5
| |||
| |||
|
|
Looks like a limitation in the conversion from Row.at() into ColData, which takes only a char* in the constructor. I don't know if Warren has fixed this in his private/devel tree or not. This sounds familiar to me and I don't know why. :-) |
#6
| |||
| |||
|
|
Viktor STARK wrote: The problem is that - if I understood things correctly - I can only define a BLOB as a std::string. And when I execute my query and try to access the data in the BLOB, it stops after the first hex 00 This truncation bug may be fixable. But, don't expect it to be possible to define an SSQLS with "200 floats in binary format" and have the one BLOB field be busted out into those 200 individual fields. SSQLS requires a 1:1 relationship between fields in your structure and fields in the database. |
#7
| |||
| |||
|
|
Chris Frey wrote: Looks like a limitation in the conversion from Row.at() into ColData, which takes only a char* in the constructor. I don't know if Warren has fixed this in his private/devel tree or not. This sounds familiar to me and I don't know why. :-) I don't recall anything about it. |
|
I presume that you're wanting to add an std::string overload. There may be a reason it can't be done. We've run into char* vs. std::string vs. SQLString vs.... problems before. |
#8
| |||
| |||
|
|
But, don't expect it to be possible to define an SSQLS with "200 floats in binary format" and have the one BLOB field be busted out into those 200 individual fields. SSQLS requires a 1:1 relationship between fields in your structure and fields in the database. This triggered a cool idea... it should be possible to write a class to use in SSQLS, in place of std::string, that takes a std::string in the constructor. |
#9
| |||
| |||
|
|
This truncation bug may be fixable. That's good news. :-) But, don't expect it to be possible to define an SSQLS with "200 floats in binary format" and have the one BLOB field be busted out into those 200 individual fields. SSQLS requires a 1:1 relationship between fields in your structure and fields in the database. Sure, I do understand that. I'd cast the data from the SSQLS structure |
|
I've put your truncation bug on the Wishlist. Since it's your itch, you're in the best position to scratch it. I don't have any idea when I can get around to it. |
#10
| |||
| |||
|
|
This triggered a cool idea... it should be possible to write a class to use in SSQLS, in place of std::string, that takes a std::string in the constructor. Sounds like a good idea. Keep us posted if you make any progress on |
ate might be a good source of![]() |
| Thread Tools | |
| Display Modes | |
| |