Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Replace chr(13) + chr(10)
Message
From
31/03/2019 10:57:41
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01667754
Message ID:
01667783
Views:
40
>>>How do you use parameters when inserting into a VFP table?
>>>
>>>>Use parameters.
>>
>>
>>insert into myTable (myField1, myField2) values (?m.parm1, ?m.parm2)
>>
>>
>>With OLEDB it is simply adding OleDb parameters.
>>
>>PS: Think of memo fields, they can have zillion of chr(13)+chr(10) in it. In fact, in VFP a character field can have any character including chr(0) in it.
>
>But I don't use OleDB in my app. For SQL Server connection I use ODBC and for VFP, commands that directly update/replace/insert into DBF tables. Do I understand that in order to use parameters with VFP table I have to use OleDB?

If you are using direct commands then you could simply do the insert, then your problem doesn't even make sense. ie:
Create Cursor test (Id Int, dummy Memo)
Local ix, lcText

Insert Into test (Id, dummy) Values (1, 'Line 1' + Chr(13)+Chr(10) +'line 2')
Insert Into test (Id, dummy) Values (2, 'Line 1' + Chr(13)+Chr(10) + ;
	'Line 2' + Chr(13)+Chr(10) + ;
	'Line 3' + Chr(13)+Chr(10) + ;
	'Line 4')

Locate
Browse
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform