I want to insert a record using SQL and one of the fields needs to contain a carriage return, e.g.
Notes field:
Line 1 Line 2 End line
H开发者_如何学编程ow would I code this SQL statement using VB
When you build the insert statement, you store it in a string somewhere. Add an escaped newline character into the string wherever you want the carrage returns to be.
A simple way to do that in VB would be:
Sql = Sql & vbCrLf
Using SQL code:
UPDATE MyTable
SET MyCol = MyCol + CHAR(13) + CHAR(10);
精彩评论