Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / DB Engine / SQL Server CE / January 2007

Tip: Looking for answers? Try searching our database.

SQL Mobile: BLOB col = NULL

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
vvf - 20 Jan 2007 14:28 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.