Embedded NULL Character in a string -SQL Server 
Author Message
 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.



Fri, 30 Aug 2002 03:00:00 GMT  
 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.



Fri, 30 Aug 2002 03:00:00 GMT  
 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.



Fri, 30 Aug 2002 03:00:00 GMT  
 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.



Fri, 30 Aug 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

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

2. sending strings with embedded nulls to serial port

3. Null-terminated character string Quest

4. Bug in debugger (Null characters in strings)?

5. How do you find Null characters in a string

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

7. Null Characters In Strings

8. Need to embed single quote in SQL string

9. Crystal Web Reports Server 7 string parameters arent being passed to SQL Server StoredProc

10. Empty String (in Access) to NULL (in SQL) via VB

11. SQL String limited to 256 characters

12. SQL Strings appear to truncate to 255 characters

 

 
Powered by phpBB® Forum Software