Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Inserting into Foxpro date field
Message
From
16/01/2007 23:45:58
 
 
To
16/01/2007 14:09:11
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01185949
Message ID:
01186145
Views:
28
>>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)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform