?
Solved

Operator/operand type mismatch error

Posted on 2003-03-12
3
Medium Priority
?
2,158 Views
Last Modified: 2013-12-25
Using a FoxPro 6 Free Table, I keep getting the following error:
Operator/operand type mismatch error

below is sample code that generates the error.  I've had no previous problems working with (viewing, editing, updating, adding new, deleting, etc...) these tables before.

strSQL = "Select field1, default from FoxProTable where field1 = '" & Text1.Text & "' And default = 'True' " 

With rstSQL
    .CursorLocation = adUseClient
    .CursorType = adOpenKeyset
    .LockType = adLockOptimistic
    .Open strSQL, cnnCnxn, , , adCmdText  <------ Error Occurs Here!
End with

Thanks in Advance!

:)
0
Comment
Question by:FirstBorn
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
eslsys earned 400 total points
ID: 8128401
Isn't the syntax for a boolean operator in FoxPro .T. and not True i.e, the SQL string should end with default = .T.
0
 
LVL 1

Author Comment

by:FirstBorn
ID: 8128583
I'm New to using FoxPro Tables... The ONLY Thing I've Used FoxPro Tables for previously was to convert from dbf to SQL Server 7 or M$ Access...

This Did The Trick!

Thank You VERY VERY VERY MUCH!!!

:)

I've Upped this to 100 pts.  Thank You Again!

0
 
LVL 1

Expert Comment

by:eslsys
ID: 8129417
Hi FirstBorn

not a problem, post a comment on here if you have any further VB/VFP questions with a link to the posted question and I'll have a look at it for you - I've been using both VB and VFP for 9+ years

thanks for the points
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

621 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question