Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Inserting into Foxpro date field
Message
De
16/01/2007 23:45:58
 
 
À
16/01/2007 14:09:11
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01185949
Message ID:
01186145
Vues:
29
>>I'm trying to insert a row into a foxpro table.
>>When inserting a date value into a foxpro table, what must I convert the value to before I can do an insert?
>>
>>I've tried this (and various combo of others)
>>
>>dDel_date =DateTime.Parse(TRow["del_date"].ToString().Trim()).Date
>>
>>and it didn't work.
>
>Can you also post your SQL code that does the insert?

After I do this,
cDate = DateTime.Parse(TRow["del_date"].ToString()
I tried
strQry = "insert into customer (fname, lname, orddate) "
strQry +="values ('"+cfname+"', '"+clname+"', '"+cDate+"')";
Then after this
dDate =DateTime.Parse(TRow["del_date"].ToString().Trim()).Date
I tried
strQry = "insert into customer (fname, lname, orddate) "
strQry +="values ('"+cfname+"', '"+clname+"', "+dDate+")";
Either way it won't go into a foxpro DATE field. However, they can both go into foxpro Character field.

Thanks Michel.
The American Republic will endure, until politicians realize they can bribe the people with their own money.
- Alexis de Tocqueville

No man’s life, liberty, or property is safe while the legislature is in session.
– Mark Twain (1866)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform