Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Inserting date into sql or firebird;What is .t. value in
Message
From
07/10/2005 08:34:35
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
01050571
Message ID:
01057129
Views:
10
>Hi Cetin
>
>>Seeing ppl suggesting ways like this I wonder if FB doesn't support usual parameter passing? ie:
>
>No Firebird is a beautiful thing. I had faced a similar problem to as Kerwam, so to get things working as of deadline I had gone this long way <g>. My advise give FireBird a try you won't regret it VFP and FB seems like they are cousins, if not real brothers/sisters <g>.
>
>It will handle the following and more
>
>myDate = {^2005/1/1}
>?sqlexec(nHandle,'INSERT INTO X (date) values ?m.myDate')>
>
>Seems the bracket in my try was not required around ?m.myDate
>
>>PS: RETURN "'" + TRANSFORM(dtoc(m.tdDate,1), "@R 9999/99/99") + "'"
>
>Thanks for the correction to the function.

Sorry, I sound to be forcing ppl to use ?m.Var style:) But my only concern is not the formatting. ?m.myVar style could be prepared and executed in a loop where formatted syntax needs to be as is per call (besides handling of formats between VFP and backend). ie:
SQLPrepare(m.lnHandle,'INSERT INTO X (date) values ?m.myDate')
for ix=1 to 10
 m.myDate = date()+m.ix
 SQLExec(m.lnHandle)
endfor
So backend needs to compile command once.
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
Next
Reply
Map
View

Click here to load this message in the networking platform