SQL Server image datatype and inserts


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: SQL Server image datatype and inserts

Hybrid View

  1. #1
    Daniel Reber Guest

    SQL Server image datatype and inserts

    This is my first time using image datatypes. I am trying to send from VB a
    byte array and insert it into a image column using ADO and a sp. I am
    getting an error saying that the datatype is incorrect. Here is my sp:

    create procedure dp_pt_report_definition


    @report_definition varbinary(128),
    @report_id int output



    as

    insert into dbo.pt_report_definition (report_definition)
    values (@report_definition)

    set @report_id = scope_identity()

    return 0

    Is there anything wrong with the sp? I already tried changing
    @report_definition to image and I still get the same error.

    I just want to rule out if it is the sp or not.

    TIA
    Daniel Reber
    Datamasters, Inc



  2. #2
    David Satz Guest

    Re: SQL Server image datatype and inserts

    maybe this helps: http://www.mssqlserver.com/faq/devel...-imagetext.asp

    "Daniel Reber" <dreber@dminconline.com> wrote in message
    news:3c42eeca@147.208.176.211...
    > This is my first time using image datatypes. I am trying to send from VB

    a
    > byte array and insert it into a image column using ADO and a sp. I am
    > getting an error saying that the datatype is incorrect. Here is my sp:
    >
    > create procedure dp_pt_report_definition
    >
    >
    > @report_definition varbinary(128),
    > @report_id int output
    >
    >
    >
    > as
    >
    > insert into dbo.pt_report_definition (report_definition)
    > values (@report_definition)
    >
    > set @report_id = scope_identity()
    >
    > return 0
    >
    > Is there anything wrong with the sp? I already tried changing
    > @report_definition to image and I still get the same error.
    >
    > I just want to rule out if it is the sp or not.
    >
    > TIA
    > Daniel Reber
    > Datamasters, Inc
    >
    >




  3. #3
    Daniel Reber Guest

    Re: SQL Server image datatype and inserts

    Thanks Dave, That's what I needed. It seems that my sp was the proplem.


    "David Satz" <davidNOSPAMsatz@yahoo.com> wrote in message
    news:3c434163@147.208.176.211...
    > maybe this helps: http://www.mssqlserver.com/faq/devel...-imagetext.asp
    >
    > "Daniel Reber" <dreber@dminconline.com> wrote in message
    > news:3c42eeca@147.208.176.211...
    > > This is my first time using image datatypes. I am trying to send from

    VB
    > a
    > > byte array and insert it into a image column using ADO and a sp. I am
    > > getting an error saying that the datatype is incorrect. Here is my sp:
    > >
    > > create procedure dp_pt_report_definition
    > >
    > >
    > > @report_definition varbinary(128),
    > > @report_id int output
    > >
    > >
    > >
    > > as
    > >
    > > insert into dbo.pt_report_definition (report_definition)
    > > values (@report_definition)
    > >
    > > set @report_id = scope_identity()
    > >
    > > return 0
    > >
    > > Is there anything wrong with the sp? I already tried changing
    > > @report_definition to image and I still get the same error.
    > >
    > > I just want to rule out if it is the sp or not.
    > >
    > > TIA
    > > Daniel Reber
    > > Datamasters, Inc
    > >
    > >

    >
    >




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center