Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8052201
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T07:29:17+00:00 2026-06-05T07:29:17+00:00

ERROR: Syntax error in query. Incomplete query clause. Please help me. string db_file =

  • 0

ERROR: Syntax error in query. Incomplete query clause.
Please help me.

        string db_file = null;
        OpenFileDialog op = new OpenFileDialog();
        op.InitialDirectory = Application.StartupPath + "\\out";
        op.Filter = "DBF file|*.dbf"; 
        if (op.ShowDialog() == DialogResult.OK)
        {
            db_file = op.FileName;
            FileInfo fi = new FileInfo(op.FileName);

                   String ConnectionString;
                   ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + fi.DirectoryName + ";Extended Properties=dBase 5.0;Mode=Read|Write|Share Deny None;Persist Security Info=True";
          System.Data.OleDb.OleDbConnection dBaseConnection;
          dBaseConnection = new System.Data.OleDb.OleDbConnection(ConnectionString);
          dBaseConnection.Open();
          System.Data.OleDb.OleDbCommand dBaseCommand;

              dBaseCommand = new System.Data.OleDb.OleDbCommand("Select * From '" + Path.GetFileNameWithoutExtension(fi.Name) + "'", dBaseConnection);
          System.Data.OleDb.OleDbDataReader dBaseDataReader;
          dBaseDataReader = dBaseCommand.ExecuteReader();
          while (dBaseDataReader.Read()) 
          {
              MessageBox.Show("x");
          }
          dBaseDataReader.Close();   

ERROR: Syntax error in query. Incomplete query clause.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T07:29:19+00:00Added an answer on June 5, 2026 at 7:29 am

    I would suggest using the VfpOleDb provider. Here is the connection string using that provider:

    ConnectionString = "Provider=VfpOleDb;Data Source=" + fi.DirectoryName;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This query gives me syntax error in when-between line. how can i solve them?
I keep getting an syntax error during runtime when this query is called. adoquery1.Active
I am getting an SQl syntax error when running the following query and can
I am getting an error Incorrect syntax near ',' for this query on line
Below is my query. Access does not like it, giving me the error Syntax
MYTABLE has ID column. However, following query generates syntax error. SELECT ID FROM MYTABLE
hello and thanks in advance for any help. I am getting an error: 'Syntax
I'm receiving the following error from the query below: Syntax error (missing operator) in
$ php app/console doctrine:query:dql 'SELECT NOW()' [Doctrine\ORM\Query\QueryException] [Syntax Error] line 0, col 7: Error:
This query fails: SELECT xpath('/my/xpath/expr', my_xml)[1] FROM my_table ERROR: syntax error at or near

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.