Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
SQL
ce
clients
clustering
connect
datamining
datawarehouse
dts
fulltext
jdbcdriver
msde
mseq
newusers
notificationsvcs
odbc
olap
programming
replication
reportingsvcs
security
securitytools
server
setup
sqlxml.viewmapper
tools
xml
  
 
date: Fri, 25 Jul 2008 14:42:17 -0700 (PDT),    group: microsoft.public.sqlserver.ce        back       


Blob writing with Ole Db   
Hi,

I'm trying to insert a row with a blob using param binding field in a
desktop database using Compact Ed. 3.5 without success.

I prepare the Command with an accessor that uses a derived
ISequentialStream class like one can see in many examples on the net.

If I try to call the ICommandWithParameters::SetParameterInfo I got a
DB_E_BADTYPENAME but documentation says not to use this api.

When I call execute with "INSERT INTO table (name, blob) VALUES
('foo', ?)", the function succeed and affected rows equals 1, but
later, when I read the table, the row is missing, the identity field
is incremented and if I open the table with Visual Studio 2005 server
explorer, I got an error while trying to read the blob field (then I
must delete that row)

ICommandWithParameters::GetParameterInfo informs that the column
should be DBTYPE_BYTES but the same problem occurs if I use that field
type and put the blob bytes directly in the data that the accessor
uses.

Most examples uses SetData to set the blob but it is supposed that the
insert with parameters should work fine.

Best regards,
Mauro H. Leggieri
date: Fri, 25 Jul 2008 14:42:17 -0700 (PDT)   author:   Calamardo

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us