Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Inserting date into sql or firebird;What is .t. value in
Message
 
To
17/09/2005 08:07:43
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
01050571
Message ID:
01050572
Views:
8
>when inserting date or logical value using SQL Passthrough, these generate error:
>?sqlexec(nHandle,'INSERT INTO X (date) values ({01/01/2005})')
>?sqlexec(nHandle,'INSERT INTO X (Boolfield) values (.t.)')
>
>what are the equivalent date representation such as:
>VFP: {01/01/2005}
>MSSQL: '01/01/2005' ?
>FIREBIRD: ?
>or logical 'true' representation such as
>VFP: .t.
>MSSQL: ?
>FIREBIRD:?
>
>?sqlexec(nHandle,'SELECT * from X where boolfied=.t.') &&error
>?sqlexec(nHandle,'SELECT * from X where .f.') &&to just get the structure
m.lcDate = DATETIME(2005,1,1,0,0,0)  & SQL Server has no Date type only DateTime
?sqlexec(nHandle,'INSERT INTO X (date) values (?lcDate)')

*** Also there is no Boolean type in SQL Server use Bit instead.
?sqlexec(nHandle,'INSERT INTO X (Boolfield) values (1)')
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform