SQL Server and text data type


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: SQL Server and text data type

  1. #1
    Immy Guest

    SQL Server and text data type


    I have a table in SQL Server 7.0 and one of the elements has been defined
    as a text data type. When I insert data into the element using and SQL statement
    or the appendchunk method, for some reason, if there is a null within my
    data, it truncates the data up from the null onwards, so the data on my
    table does not fully reflect the data that was sent to it. ANyone had this
    sort of problem or know how I could resolve this problem.

    Your help is greatly appreciated

    Imran

  2. #2
    Michael Levy Guest

    Re: SQL Server and text data type

    If you really need to keep the char(0), why not change the field to
    (var)binary or image instead of text?

    -Mike
    --
    Michael Levy MCDBA, MCSD, MCT
    michaell@gasullivan.com



  3. #3
    immy Guest

    Re: SQL Server and text data type


    I tried that and it gave the same error.

    "Michael Levy" <michaell@gasullivan.com> wrote:
    >If you really need to keep the char(0), why not change the field to
    >(var)binary or image instead of text?
    >
    >-Mike
    >--
    >Michael Levy MCDBA, MCSD, MCT
    >michaell@gasullivan.com
    >
    >



  4. #4
    Michael Levy Guest

    Re: SQL Server and text data type

    I was able to place a NULL (char(0)) into a varbinary column with the
    following from within the Query Analyzer:

    create table t (b varbinary(10))
    insert into t values (0x00)
    select * from t

    I wonder if the problem is in front-end that you're using to load the data?

    -Mike
    --
    Michael Levy MCDBA, MCSD, MCT
    michaell@gasullivan.com



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