Thanx Rabbit.your right.. the SSMS result set doesn't print multi-line characters to the screen.I used the below query to to check if it was actually there in DB .
SELECT di_borrower
FROM SL_DataInfo
WHERE (di_borrower LIKE '%' + CHAR(10)+ '%')
AND HAPPY ME !! IT WAS THERE IN DB ! So the sqlbulkinsert did insert correctly after all.
Then just to share my solution, what i did...
User Profile
Collapse
-
Below is the codes for what i have now
...Code:Dim conectionstring As String = "" If strExt.ToLower() = ".xls" Then conectionstring = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Excel & ";Extended Properties=Excel 8.0" ElseIf strExt.ToLower() = ".xlsx" Then conectionstring = "Provider=Microsoft.ACE.OLEDB.12.0;DataLeave a comment:
-
-
Using SqlBulkCopy with Line Feed and Carriage Return
I am using SqlBulkCopy to import excel data to mssql.
I have many rows of data in excel with 2 columns which the content has Line Feed and Carriage Return (I understand from reading online below is true)
Chr(10) == vbLF == Line Feed (LF)
Chr(13) == vbCR == Carriage Return (CR)
Chr(13) & Chr(10) == vbCrLf == Carriage Return/Line Feed
The SqlBulkCopy is working perfectly...
No activity results to display
Show More
Leave a comment: