Solved

SQL Statements for excel sheets via ADO

Posted on 2003-11-04
1
823 Views
Last Modified: 2007-12-19
Hi all,
I have a problem in accessing the excel sheets via ADO using SQL command. If I access the excel sheets using a single word field (e.g. PartNo), I can retrieve the data without problem but if I try to retrieve data using a two word field (e.g. First Name), I will have an exception. Does anyone have any idea how to solve this problem.

select * from pract$ where PartNo is 'A1234'   // this can work

select * from pract$ where First Name is 'John'   // this cannot work

A billion thanks
Rice Cake.

0
Comment
Question by:antioch_75
[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
1 Comment
 
LVL 27

Accepted Solution

by:
kretzschmar earned 125 total points
ID: 9684871
usual you do doublequote the field

select * from pract$ where "First Name" is 'John'  

but it could only be that you must use brackets

select * from pract$ where [First Name] is 'John'  

must test mySelf First

meikl ;-)
0

Featured Post

Industry Leaders: 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

Suggested Solutions

Title # Comments Views Activity
Correct Component for Shopping Cart. 2 137
Dev Express grid collapse 2 55
How to create virtual printer while installing my application 5 85
update joined tables 2 74
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

710 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