> >
> > Chris,
> > Why don't you simply use parameters and use corresponding .Net datatypes (DateTime for date/datetime, bool for logical ...).
> >
> > PS:
> >
> > mycommand = "insert into c:\btn(btn, current) values ('3368675309', " & True & ")"
> >
> > should yiled a string like
> >
> >
insert into c:\btn(btn, current) values ('3368675309', True )
> >
> > and VFP doesn't know what True is.
> >
> > Check
https://www.foxite.com/archives/vfpole-dates-0000153532.htm> >
> > Cetin Basoz
>
> I guess I'd have to respond to that with why would I want to use parameters. It takes a lot more code writing than just setting the commandtext to the new insert string. And in my way of looking at it this example is using parameters mycommand = "insert into c:\btn(btn) values ('" & phonebox.text & "')"
>
> I'll take a look at the date format.
Why would you? One simple reason you wouldn't think how to create correct string if you do it all with string. Other might be about SQL injection. Well do not use if you don't want to and could do it all w/o parameters:)
string insertCommand = _
String.Format( "insert into c:\btn (myDate) values ({0})", DateTime.Now.ToString("{^yyyy/MM/dd}") );
Cetin Basoz