Hi
A problem is - how can I make that statement correct? - I would like to
SELECT somenthink like that:
String *SQLstatement = String::Format(S" SELECT * FROM Table WHERE Date =
{0}", DateTimePicker1->Value->ToShortDateString() );
There is a String statement (*SQLstatement) so I concatenate DateTimePicker1
value as string value too. But I've got an "incorrect data type error". Is
there any
solution to make this cnvertion clear - maybe using any SQL finction inside
string?.
[Access file - "Date" column type: DateTime, oleDbDataAdapter]
Good day, thanks for wrote.
Jon Skeet [C# MVP] - 31 Aug 2004 20:35 GMT
> A problem is - how can I make that statement correct? - I would like to
> SELECT somenthink like that:
>
> String *SQLstatement = String::Format(S" SELECT * FROM Table WHERE Date =
> {0}", DateTimePicker1->Value->ToShortDateString() );
I would suggest not doing that in the first place. Use parameters
instead, and you don't need to do any conversion yourself.

Signature
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Przemek - 01 Sep 2004 07:53 GMT
> solution to make this cnvertion clear - maybe using any SQL finction inside
> string?.
[quoted text clipped - 3 lines]
>
> Somebody says, that I should do it with parameters, but how can I do it?