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
How would I code this SQL statement using VB
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
How 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);