Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Server Data type
Message
 
 
To
15/05/2003 14:16:06
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00604595
Message ID:
00795303
Views:
17
Carsten,
Sorry for the delay. It's been a hectic month.

When using booleans for RDBMSes, use booleans expressions instead of constants. SQL Server doesn't understand .T./.F., it understands true and false.

For .F., use something like 1=0 as ldefault. For .T., use 1 = 1. See mods in bold below.

HTH.

>>
>>Red,
>>In SQL Server, use the Bit field. You won't need to do anything. The ODBC driver will convert logical to bit and back again.
>>
>>HTH.
>
>Larry,
>
>Although the ODBC driver does handle this, I have a problem when I need to specify a value in my SPT statement, or even in the SQL from a Remote View.
>
>SELECT Division.csiteid, Division.cdivisionid, Division.cdivisionname,;
> Division.luseseparatenews, Division.dadddate, Division.cadduserid,;
> 1 = 0 AS ldefault, UPPER(Division.cdivisionid) AS sortfield,;
> Division.cnewsdoc, Division.caddress1, Division.caddress2,;
> Division.ccity, Division.cstate, Division.cpostalcode, Division.cphone;
> FROM division Division;
> WHERE Division.csiteid = ?ThisForm.scSiteID;
> AND lActiveDivision = 1 = 1 ;
> ORDER BY Division.cdivisionname
>
>I get a problem with the ".F. as ldefault" and well as the "lActiveDivision = .t."
>
>What is the best solution to this? I need to maintain the code so that I can use either a VFP or an SQL backend, so I can't abandon the .T./.F. paradigm. Do I need to use compiler directives, and what is the best way to this, or is there another way to handle this?
>
>TIA
>
>Carsten Thode
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Reply
Map
View

Click here to load this message in the networking platform