Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Writing boolean values into table with FoxPro OLE DB Provider

426 views
Skip to first unread message

Arlyn_L

unread,
May 10, 2008, 5:51:01 PM5/10/08
to
How do yoy insert a bool into a table?

for example:

bool _var1 = true;
...
string _updateSQL = Format("UPDATE table1 SET logicalcolumn = {0} WHERE
recn- = {1}", _var1, 5);
OleDbCommand command = new OleDbCommand(_updateSQL, _connection);
command.ExecuteNonQuery();

gives an error of "SQL:Column 'TRUE' is not found"

How do you format boolean type so it will write to a FoxPro table?

Regards;
--
Arlyn_L

Wen Yuan Wang [MSFT]

unread,
May 12, 2008, 5:30:34 AM5/12/08
to
Hello Arlyn_L,

According to your description, you want to know how to update a table which
contains a Boolean Typed Column, correct? If I misunderstood anything here,
please don't hesitate to correct me

In Forpro, setting value to Boolean Typed Column is different from SQL
database. It couldn't recognize 'True' as logic type. To update it, please
use the following method.
As you can see, (.t.) means True, and (.f.) means False.

UPDATE table1 SET c1=.t. WHERE recno=5

Hope this helps. Please try the above method and let us know if this works
on your side. We are glad to assist you.

Have a great day,
Best regards,
Wen Yuan
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msd...@microsoft.com.
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Arlyn_L

unread,
May 12, 2008, 2:01:01 PM5/12/08
to
Wen Yuan;

Thank you, problem solved.

--
Arlyn_L

Wen Yuan Wang [MSFT]

unread,
May 13, 2008, 1:06:54 AM5/13/08
to

Welcome, Arlyn_L. We are glad to assist you.

Have a great day,
Best regards,
Wen Yuan

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msd...@microsoft.com.
==================================================

0 new messages