>>>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