Question

C#, VFP, ERROR [22018] [Microsoft][ODBC Visual FoxPro Driver]Operator/operand type mismatch.

Asked by: logicmaker

I am trying to pass a DateTime value to my FoxPro database in C# and getting the following exception
 ERROR [22018] [Microsoft][ODBC Visual FoxPro Driver]Operator/operand type mismatch.

I have tried passing value in many  different ways such via query string, or inline with query but failed.

I am only getting this exception while passing the  DateTime, I can pass any other data type in the query.

Your help is much appreciated.

This question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Sign Up Now!
Asked On
2007-08-30 at 06:23:06ID: 22797150
Tags

type

,

mismatch

,

foxpro

,

visual

,

odbc

Topics

C# Programming Language

,

Databases Miscellaneous

,

FoxPro Database

Participating Experts
2
Points
250
Comments
15

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

Companies like CVS, Honeywell, Chevron, Toyoto, TriStar Pictures, the U.S. Army, and Accenture

Stay Ahead of the Competition

Advance your career with Experts Exchange. Plug into technology resources for professional development, including solutions, peer-reviewed articles, tutorials, and live training sessions.

Related Solutions

  1. foxpro
    how do I access a btrieve database in foxpro 2.6?
  2. FoxPro and ODBC?????
    How do you insert a date Varible ina FoxPro database I keep getting syntax errors or Data mismatch errors.
  3. VFP^ ODBC Date Format
    I have been trying to run a sql query connecting to foxpro table through ODBC front page. The connection is valid and the query runs fine for any any field. However, for the date field, it is giving me Database Results Error Descripti...
Check out some of our great resources!

Featured Articles

Learn from the Best

Our expert teachers are leaders and respected professionals in their tech field and include over 300 Microsoft MVPs. The best part is they're passionate about sharing their expertise with you!

lrmoore has answered 13,534 questions on Experts Exchange since July 2000 and has more than 18 years experience in the networking industry. The six-time Microsoft MVP's specialties include firewalls, virtual private networking, and network management.

angeliii has answered 40,724 questions on Experts Exchange since March 2000. He is a Microsoft Most Valuable Professional for his work with MS SQL Server & Development. He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

Leew has answered 19,673 questions on Experts Exchange since August 1997. He began working with computers in 1989 with a Turbo running DOS 3.3. Since then he has mastered Windows 2000 and XP operating systems, hard drives/storage and Small Business Server.

Meet a few of our expert instructors

Learn Any Technology

We’ve got experts and training resources for hundreds of technology topics. Whatever you need to learn, Experts Exchange has got you covered.

See all topics That's a lot of topics!

Get Help Anywhere

No matter where you find yourself in need of tech help, Experts Exchange is available for you with mobile site access from your smart phone or tablet.

Available from your iPad, iPhone, and many other mobile devices!

Get full access to the help you need.

Subscribe Now

30-day free trial. Register in 60 seconds.

The Latest Technology News and Tips

New Solutions Everyday

Because of our active community of experts, on average new questions receive their first comment in under 30 minutes.

Top C# Questions

       

Hear What our Users are Saying

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

20130405-EE-VQP-041

3 Ways to Join

30-Day Free Trial

What you can do at Experts Exchange:

  • Reach your professional goals
  • Advance your tech skills
  • Learn from expert instructors
  • Get help anywhere, anytime
  • Learn from hundreds of topics

What users are saying

  • I am very new to Crystal Reports and SQL Server databases, but -- with the help of Experts Exchange -- I have been able to meet my deadlines and produce effective products.

    Jan Miller

  • I love EE and have been a member since 2004. I just today started my third contract assignment which I attribute to the skills I am learning from other experts.

    Robert Antonellis

  • It's my sole resource as I'm kind of an MS Access loner at my company. It's like having colleagues available when I run out of my own steam.

    Karen Ruskin