SQL Mobile Bitmap Bug or Me?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi I've just upgraded and app from SQL CE 2.0 to SQL Mobile.

All was going well, (or so I thought)


If I run the following bit of SQL into a SqlCeDataReader


SELECT
ImageBlob < image field type
FROM
MOB_PromoImages


When I run the following code.


SqlCeDataReader result_set = <snip run our sql>
if (result_set != null)
{
if (result_set.Read())
{
MemoryStream msimageblob = new
MemoryStream(result_set.GetSqlBinary(0).Value);


imageblob = new Bitmap(msimageblob);
msimageblob.Close();
}



}


I throw the following exception.

{"Internal error: The column ordinal cannot be found. [ Table name (if
known) = {051D69CE-48DE-4DB8-EF7D-2FC9BFE4E7F2} ]"}
System.Exception
{System.Data.SqlServerCe.SqlCeException}


I can run the same query using SQL Analysiser on the device and it does

look like it is returning data.


Similarly from code, I can type string colname=result_set.GetName(0);

which works fine.

+ I have just found that ExecuteScalar works.....

Is this a bug, or me?

.



Relevant Pages

  • Re: OLEs and BLOBs
    ... Well if you are going to an ADP you are going to use SQL right? ... if so the image field type is what you are looking for. ... Dim adoDocument As New ADODB.Recordset ... Dim mStream As ADODB.Stream ...
    (microsoft.public.access.modulesdaovba)
  • Re: Saving JPEG images to images field in SQL2000 with ADODataSet
    ... If a TDBImage component can not display a JPEG, ... And how to display the image from image field type in SQL 2000 if I use ...
    (borland.public.delphi.database.ado)
  • Re: Memory hog - my app and SQLCE
    ... Still there are other data options that don't involve the 2+ Mb hit of SQL ... Halfway between CSV and SQL Mobile would be SQLite, ... I added the construction of an SDF and a open connection (see ... DatabaseConn = new SqlCeConnection; ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Deploying sql everwhere
    ... Microsoft is aware of one of the bugs - I submitted a support request for it ... error that I get 'sql mobile has encountered an error opening the database'. ... this is the dll I referenced in my .NET compact application but perhaps ...
    (microsoft.public.sqlserver.ce)
  • Re: Merge Rep Error - No query processor exists...
    ... VS2005 environment downloaded and installed SQL Server Mobile as expected. ... The local interactions against the client database produced no SQL exceptions ... you have to reset your device and reinstall SQL Mobile to get past this. ...
    (microsoft.public.sqlserver.ce)