?
Solved

Operator/operand type mismatch error

Posted on 2003-03-12
3
Medium Priority
?
1,933 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month12 days, left to enroll

752 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