Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

How To Logical Values Must Be Sent to SQL Server as 1 or 0


View products that this article applies to.

This article was previously published under Q130507

↑ Back to the top


Summary

When you send logical data to SQL Server via the SQLEXEC() function, true (.T.) and false (.F.) values must be sent as 1 and 0.

↑ Back to the top


More information

The following example shows how to use the Insert command to add a record that has a logical field:
   nHandle  = SQLCONNECT('<data source name>,'<user>,'<password>')
   nSuccess = SQLEXEC(handle,'insert into tablename (logicalfield)
      values (1)')
				
This puts a logical true value into the table on SQL Server.

↑ Back to the top


Keywords: KB130507, kbhowto

↑ Back to the top

Article Info
Article ID : 130507
Revision : 4
Created on : 7/1/2004
Published on : 7/1/2004
Exists online : False
Views : 512