You don't want quotes around numeric or logical values. VFP dates need to be formatted differently too.
You really should be using Command Parameters for this stuff - it'll take care of all the conversions for you.
+++ Rick ---
>Hi,
>
>I'm having a hard time with my SQL insert statement that I am using in ASP.NET. I need to insert a record into a VFP free table. I can insert values as long as the field is a character field. I can not insert a logical, numerical, or DateTime because my SQL String converts all data to a character. My Sql string is below: Does anyone have any ideas on how I can fix this? Thank you.
>
>Tim
>
> Dim sb As New StringBuilder
> sb.Append("INSERT INTO testdb (Job_num, Slot, Date, Number ) Values( '")
> sb.Append("JN43")
> sb.Append("','")
> sb.Append("01"))
> sb.Append("','")
> sb.Append(DateTime.Now)
> sb.Append("','")
> sb.Append(204)
> sb.Append("')")
> myInsertString = sb.ToString()