how to write a disk file to a blob field in SQLServer Database 
Author Message
 how to write a disk file to a blob field in SQLServer Database

Hi

What i want to do is.. read a disk file and dump it to a BLOB field in
SQLServer Databas. I am using SQLServer , developing in Visual C++ 6.0
without using MFC.

At the moment i get entire file to a buffer and dump it to the Database, it
dosen't seem to write it completely. That is when read it back .. all the
data have not been wri{*filter*} to the database.

Can any one give me some ideas/code samples..

regards
moditha



Wed, 28 Aug 2002 03:00:00 GMT  
 how to write a disk file to a blob field in SQLServer Database
    Hi Moditha,
    There is an example called AOTBLOB.EXE that shows insert,update,delete
of a blob field into SQL Server through OLE DB. Look for it at Microsoft
support website.

Bob Beauchemin


Quote:
> Hi

> What i want to do is.. read a disk file and dump it to a BLOB field in
> SQLServer Databas. I am using SQLServer , developing in Visual C++ 6.0
> without using MFC.

> At the moment i get entire file to a buffer and dump it to the Database,
it
> dosen't seem to write it completely. That is when read it back .. all the
> data have not been wri{*filter*} to the database.

> Can any one give me some ideas/code samples..

> regards
> moditha



Wed, 28 Aug 2002 03:00:00 GMT  
 how to write a disk file to a blob field in SQLServer Database
Take a look at the GetChunk method.



Quote:
>Hi

>What i want to do is.. read a disk file and dump it to a BLOB field in
>SQLServer Databas. I am using SQLServer , developing in Visual C++ 6.0
>without using MFC.

>At the moment i get entire file to a buffer and dump it to the Database, it
>dosen't seem to write it completely. That is when read it back .. all the
>data have not been wri{*filter*} to the database.

>Can any one give me some ideas/code samples..

>regards
>moditha



Fri, 30 Aug 2002 03:00:00 GMT  
 how to write a disk file to a blob field in SQLServer Database

Hi

What i want to do is.. read a disk file and dump it to a BLOB field in
SQLServer Databas. I am using SQLServer , developing in Visual C++ 6.0
without using MFC.

At the moment i get entire file to a buffer and dump it to the Database, it
dosen't seem to write it completely. That is when read it back .. all the
data have not been wri{*filter*} to the database.

Can any one give me some ideas/code samples..

See if the following helps:

HOWTO: Sample Functions Demonstrating GetChunk and AppendChunk
http://www.*-*-*.com/


Microsoft MVP (Visual Basic)



Sun, 01 Sep 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Writing Binary Trees to disk as an index file for databases

2. exchanging data between database BLOB field and program variable

3. XML from blob field in sql database to XMLDOMDocument

4. blob field in a database

5. How to write text into SQL database? (BLOB)

6. ODBC to SQLServer: Error Unable to write to file buffer

7. ODBC to SQLServer: Error Unable to write to file buffer

8. disk reading and writing file performance

9. write .dlls and exes from res files to disk in app

10. problem reading/writing text file from disk

11. periodic sluggish performance on Disk Open and File Write

12. Misleading Disk full error when writing files beyond 32767 * 1024 bytes

 

 
Powered by phpBB® Forum Software