Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Date Field in MySql database
Message
De
01/01/2004 07:21:09
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00863259
Message ID:
00863261
Vues:
11
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform