Embedded NULL Character in a string -SQL Server

Embedded NULL Character in a string -SQL Server

Post by Karthik Krishna » Tue, 14 Mar 2000 04:00:00



Hi,

I am having a big string with embedded Null(Chr$(0)) Character in it.  I am
trying to insert a record with a blob field containing this big string.  I
could do it without any problem in DAO.  But in ADO, I could not use direct
INSERT Statement as it fails on finding NULL Character.  I tried to convert
the data to HEX and update the TEXT/var binary data type in SQL Server 7.0.
This works fine but the restriction here is, it cannot take more than 8000
characters as we are typecasting to VARCHAR.  All these work nicely in SQL
ANYWHERE as SQL ANYWHERE database supports data input in HEX.

Any clues?

Regards,
Karthik.

 
 
 

Embedded NULL Character in a string -SQL Server

Post by Karthik Krishna » Tue, 14 Mar 2000 04:00:00


Hi,

I am having a big string with embedded Null(Chr$(0)) Character in it.  I am
trying to insert a record with a blob field containing this big string.  I
could do it without any problem in DAO.  But in ADO, I could not use direct
INSERT Statement as it fails on finding NULL Character.  I tried to convert
the data to HEX and update the TEXT/var binary data type in SQL Server 7.0.
This works fine but the restriction here is, it cannot take more than 8000
characters as we are typecasting to VARCHAR.  All these work nicely in SQL
ANYWHERE as SQL ANYWHERE database supports data input in HEX.

Any clues?

Regards,
Karthik.

 
 
 

Embedded NULL Character in a string -SQL Server

Post by Karthik Krishna » Tue, 14 Mar 2000 04:00:00


Hi,

I am having a big string with embedded Null(Chr$(0)) Character in it.  I am
trying to insert a record with a blob field containing this big string.  I
could do it without any problem in DAO.  But in ADO, I could not use direct
INSERT Statement as it fails on finding NULL Character.  I tried to convert
the data to HEX and update the TEXT/var binary data type in SQL Server 7.0.
This works fine but the restriction here is, it cannot take more than 8000
characters as we are typecasting to VARCHAR.  All these work nicely in SQL
ANYWHERE as SQL ANYWHERE database supports data input in HEX.

Any clues?

Regards,
Karthik.

 
 
 

1. Embedded NULL Character in a string -SQL Server

Hi,

I am having a big string with embedded Null(Chr$(0)) Character in it.  I am
trying to insert a record with a blob field containing this big string.  I
could do it without any problem in DAO.  But in ADO, I could not use direct
INSERT Statement as it fails on finding NULL Character.  I tried to convert
the data to HEX and update the TEXT/var binary data type in SQL Server 7.0.
This works fine but the restriction here is, it cannot take more than 8000
characters as we are typecasting to VARCHAR.  All these work nicely in SQL
ANYWHERE as SQL ANYWHERE database supports data input in HEX.

Any clues?

Regards,
Karthik.

2. ODBCDirect problem

3. Removing embedded special characters in SQL Server 7.0 Text fields

4. Newbie?: Does SQL Server run on 16 bit platform?

5. Differences between NULL, Empty String, Null String?

6. Advanced Query #1 on MS-SQL 6.5

7. Inserting a string containing a null character (ADO)

8. Oracle/VMS performance problems with Multithreaded Server

9. Strings containing a null character.

10. spaces, removing from character strings SQL Server 2000

11. SQL Server (ADO) Can't Insert Strings Longer Then 30 characters

12. NULLS FIRST (or LAST) in PL/SQL's Embedded SQL

13. null string sql server insert