|
-
Jun 4th, 2003, 10:51 PM
#1
Thread Starter
Hyperactive Member
Square character in database table *Resolved *
Hi all, I have a SQL Server 2000 database that has a table in it called
Person. One of the attributes is the persons address which is populated via
a VB.Net application.
A user is able to enter as up to four lines as their address in a text field
in the VB app. This information is then inserted into the SQL table via a
stored procedure.
I replace the line feed characters in the address before I send the Insert
string to the stored procedure.
My problem is that when I view the table with the addresses in it, whilst
the line feed characters have in fact been replaced there is also a little
square box (Unicode character) which has been inserted.
This little character is causing my application a few problems, so, how can
I get rid of it and also, why is it getting placed there in the first
place??
Thanks alot for any help
Cheers
Markus
Last edited by MarkusJ_NZ; Jun 5th, 2003 at 12:48 AM.
-
Jun 5th, 2003, 12:27 AM
#2
Chances are it is the carriage return character (ascii code 13). A multi-line text box adds the ascii codes 13 (carriage return = vbCR) and 10 (LineFeed = vbLF) when the user hits the enter key.
You mentioned that you replace the line feeds. It sounds like you want to replace the carriage returns and linefeeds, use the vbCRLF constant or the vbNewLine constant.
strData = Replace(txtData.Text,vbNewLine," ")
-
Jun 5th, 2003, 12:47 AM
#3
Thread Starter
Hyperactive Member
Thanks for that, I was just replacing the line feed using chr(10). I changed the code to replace vbCrLF and it's working now (No unicode characters)
Thanks again
Mark
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|