>For SQL server see the parametric approach. It also handles headaches for conversion if field on VFP side is either date or datetime. ie:
>
>
>* f1: char, f2: datetime, f3:datetime
>cInsertCmd = "insert into myTable (f1, f2, f3) values (?m.Value1, ?m.Value2, ?m.Value3)"
>SQLPrepare(m.lnHandle,m.cInsertCmd)
>m.ldStart=date()
>for ix=1 to 5
> m.Value1 = cdow(m.ldStart+m.ix-1)
> m.VAlue2 = m.ldStart + m.ix - 1
> m.Value3 = datetime() - (m.ix * 3600)
> SQLExec(m.lnHandle)
>endfor
Cetin
Cetin,
Could you please tell me, how would you insert dates into Access database using parameters. I don't have Access installed on my work computer :(, but as I understood, we need to use character variable and not a date. Am I correct?
Thanks a lot in advance for your answer.
If it's not broken, fix it until it is.
My Blog