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

FoxPro Logical data type and VB

344 views
Skip to first unread message

Mike Houchen

unread,
Jun 3, 2003, 12:00:06 PM6/3/03
to
I'm trying to insert a record into a FoxPro table with a
field defined as "logical" in FoxPro.

I've tryed ".T."/".F."; 0/1; Yes/No; True/False, etc.
All generate an error "Data Type Mismatch".

This is with the Microsoft Visual FoxPro Driver under VB6.
With Access97, the record can be added just fine,
specifying a 0, Yes, etc. for the field value.


Any help would be appreciated.

Mike

Cindy Winegarden

unread,
Jun 3, 2003, 12:24:47 PM6/3/03
to
Hi Mike,

The following worked for me with SQL Pass-through :
"INSERT INTO TestLogical VALUES (1, .T.)"
"INSERT INTO TestLogical VALUES (2, .F.)"
"INSERT INTO TestLogical VALUES (3, 1)"
"INSERT INTO TestLogical VALUES (4, 0)"
"INSERT INTO TestLogical VALUES (5, 'True')"
"INSERT INTO TestLogical VALUES (6, 'False')"

"Yes", "No", Yes, and No did not work for me.

What does your SPT string look like? Which ODBC driver are you using? The
latest is version 6.1.8629.1, available from
http://msdn.microsoft.com/vfoxpro/downloads/addons/odbc.asp.

--
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
cindy.wi...@mvps.org, www.cindywinegarden.com

"Mike Houchen" <mhou...@proxymed.com> wrote in message
news:0f0601c329e9$33487050$a601...@phx.gbl...

0 new messages