Hi All,
Thanks for your previous help on this group.
I have a new problem: I do a "select col1, col2, col3 from T1 inner join T2
on ... " where col3 is a BLOB column;
If I use cmd.GetValue(1) I get a pointer to data of col1, GetValue(2) gives
me the pointer to col2, but GetValue(3) gives me a NULL pointer (that is a
NTEXT, i.e., BLOB column.) Any idea why? I should get a ISequentialStream**
back...
Thanks!
vvf
Marius Prisecaru - 20 Jan 2007 17:01 GMT
Hi,
My experience w/ SQL Mobile is that you have to have a column before your
BLOB column in your result set.
For example, try this:
"SELECT ID, BlobCol, Col1, Col2 FROM Table1 INNER JOIN Table2 ON ... "
where you would have a table as:
ID, BlobCol ...
Note that you include the "ID" field in your query even though you may not
need it. Then, use static_cast<ISequentialStream**>(cmd.GetValue(2)) and
dereference that to obtain a pointer to ISequentialStream.
See if that works. In fact, check your HRESULT from MoveFirst/MoveNext. It
should return 0x00040EDA (errors occurred) since you are able to retrieve
the other columns.
Marius
> Hi All,
>
[quoted text clipped - 13 lines]
> Thanks!
> vvf
vvf - 20 Jan 2007 23:43 GMT
That worked!
Thanks!
vvf
> Hi,
>
[quoted text clipped - 36 lines]
> > Thanks!
> > vvf