Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Date Field in MySql database
Message
From
01/01/2004 07:21:09
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00863259
Message ID:
00863261
Views:
12
>Hi Folks, and Happy New Year
>I am testing a MySql database on a Novell cluster, and it works great. I have a problem though, when entering a VFP date value into a MySql Date field. The record is entered, but i can't browse it, nor query it. I can't even query the table anymore, and i had to drop the table. In what format should i enter it?
>
>TIA
>Jaime

Jaime,
Either a canonical ODBC format or parametric entry should do (at least that was what I did in the past and worked) :

ODBC canonical :
ldDate = date()

SQLEXEC(lnHandle,;
"insert into myTable (mydate) values ('"+;
  transform(ttoc(dtot(ldDate),1),'@R 9999/99/99 99:99:99')+"')" )
Parametric (I prefer) :
ldDate = date()

SQLEXEC(lnHandle, "INSERT INTO myTable (mydate) values (?m.ldDate)" )
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform