Re: BLOB

From: HelloWebWorld (HelloWebWorld.1aldc3_at_mail.mcse.ms)
Date: 08/06/04

  • Next message: Hari Prasad: "Re: Restore runs longer in batch mode"
    Date: Fri, 6 Aug 2004 13:56:52 -0500
    
    

    Hi John:
    Can you please tel me how I can store documents like word and Excel to
    the SQL Server Database? If you can email me at doctor27_in@yahoo.com,
    I would highly appriciate it.
    Thanks,
    Nikunj

    John A. Curry wrote:
    > *Well it is amazing what you find after you post. After much
    > searching I
    > found it on my own. For anyone else who may have wanted to know how
    > to
    > populate a image type, there is an executable that will do it called
    > TextCopy.exe. A sample command line is below.
    >
    > C:\MyDocs\My
    > Pictures>textcopy -I -Usa -PMyPassword -SMyServer -DMyDatabase
    > -TMyTable -CI
    > mageColumn -W"where ID = 3" -Fsample.jpg /Z
    > TEXTCOPY Version 1.0
    > DB-Library version 8.00.194
    > debug: Final parameters:
    > debug: Server: MyServer
    > debug: Login: sa
    > debug: Password: MyPassword
    > debug: Database: MyDatabase
    > debug: Table: MyTable
    > debug: Column: ImageColumn
    > debug: Where clause: where ID = 3
    > debug: File: sample.jpg
    > debug: Direction: Into SQL Server from file.
    > debug: Chunk size: 4096 bytes
    > SQL Server 'MyServer' Message 5701: Changed database context to
    > 'master'.
    > SQL Server 'MyServer' Message 5701: Changed database context to
    > 'MyDatabase'. (Concerning line 1)
    > debug: Query: select ImageColumn from MyTable where ID = 3
    > debug: File 'sample.jpg' opened for read
    > debug: File is 9894 bytes long
    > debug: Read 4096 bytes from file
    > debug: Read 4096 bytes from file
    > debug: Read 1702 bytes from file
    > debug: File closed
    > Data copied into SQL Server image column from file 'sample.jpg'.
    >
    > The other key I found is that the existing column must not be null.
    > I
    > resolved this by running the following.
    >
    > INSERT INTO [dbo].[MyTable] VALUES ('3', 0x0 )
    >
    > If you don't do this you will get the following error when you run in
    > debug
    > (-Z)
    >
    > ERROR: Text or image pointer and timestamp retrieval failed.
    >
    > There is also a stored procedure if you would like it let me know and
    > I can
    > post that as well.
    >
    > -John
    >
    >
    >
    >
    > "John A. Curry" <JohnCurry@Captaris.com> wrote in message
    > news:uzYznuiXEHA.2408@tk2msftngp13.phx.gbl...
    > > Hello,
    > >
    > > I am looking into storing images into SQL and want to use BLOB
    > which I
    > > understand to be the best method. Can someone supply me with a
    > simple
    > > example of how to import a file into the database?
    > >
    > > Thanks in advance,
    > >
    > > John
    > >
    > > *

    --
    HelloWebWorld
    ------------------------------------------------------------------------
    Posted via http://www.mcse.ms
    ------------------------------------------------------------------------
    View this thread: http://www.mcse.ms/message815747.html
     
    

  • Next message: Hari Prasad: "Re: Restore runs longer in batch mode"

    Relevant Pages

    • RE: query SQL Server from mainframe?
      ... Thanks John - so it wouldn't be possible to install any kind of SQL Server ... > This will to some extent depend on what you are running on the mainframe! ... >> Is it possible to query a SQL Server database from the mainframe? ...
      (microsoft.public.sqlserver.server)
    • Re: testing with sql server
      ... Regarding your SQL Server 2000 debugging problems, ... version to debug with a sql server 2000 database. ... My goal is to debug some t-sql commands. ... attach to a process and the process that I need to attach to is ...
      (microsoft.public.sqlserver.setup)
    • Re: Can i debug/watch on the triggers INSERTED and DELETED records/values?
      ... > Sometimes I do debug remotely. ... we found that debugging did not work when you had Windows ... Now, port 135 is not any port: ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ...
      (comp.databases.ms-sqlserver)
    • Re: Debugging Windows Service
      ... I am writing a Windows Service that works with SQL Server. ... I want to be able to debug it, ... it looks as if Local System does not have access to SQL Server, ...
      (microsoft.public.dotnet.general)
    • Re: virtual directories for the ftp server
      ... John, thanks for you help. ... > the Registry Key name itself. ... > If you still don't have luck, you can try getting a debug version of the FTP ... © 2003 Microsoft Corporation. ...
      (microsoft.public.windowsce.embedded)