Question

error '80040e14'

Asked by: bvinson

I'm using this SQL statement:
       strSQL = "SELECT tblItem.ItemName, tblItem.ItemPartNum, "&_
             "tblItem.ItemActive, tblItem.ItemPrice, tblItem.ItemSupp, "&_
             "tblItem.ItemDesc, tblItem.ItemShortDesc, tblItem.ItemPic, "&_
             "tblItem.ItemThumb, tblItem.ItemALT, tblItem.ItemMan "&_
            "FROM tblItem"

When I do a response.write for the output statement I get:
SELECT tblItem.ItemName, tblItem.ItemPartNum, tblItem.ItemActive, tblItem.ItemPrice, tblItem.ItemSupp, tblItem.ItemDesc, tblItem.ItemShortDesc, tblItem.ItemPic, tblItem.ItemThumb, tblItem.ItemALT, tblItem.ItemMan FROM tblItem

and it runs fine in Access, but on the page I get a big flaming:

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC Microsoft Access Driver] Syntax error in FROM clause.

Any ideas?

Thanks!
bvinson

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

Asked On
2004-03-20 at 20:37:57ID20926190
Tags

80040e14

,

from

,

select

Topic

Active Server Pages (ASP)

Participating Experts
4
Points
0
Comments
19

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

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

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

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Assinging strSQL to a variable
    I am creating an auto string/number and assigning it to a text box. Im not sure how to get the results from the sql statment (which is only a single value into a variable) I keep getting a type mismatch error. Heres the code Private Sub cmdGenerate_Click() Dim strDev As S...
  2. Conn.Execute(strSQL)
    Conn.Execute(strSQL) How can I tell if this was successful? Can I do an If THen around it and it will enter the block if it worked?
  3. ERROR UPDATE DB2 IN STRSQL
    Hi, I have problem in strsql DB2 AS 400 , I want to update field ATRAUM (Character 2) in dtbln04 table with ZUMBUY (Character 2) in artms00f table. My syntax is : UPDATE DTBLN04 SET ATRAUM= (select ZUMBUY from ARTMS00F w...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: fozyletPosted on 2004-03-20 at 20:47:10ID: 10642854

tried [tblItem] using [] ?!
i can't see any logic to that suggestion... still...! ;P

 

by: bvinsonPosted on 2004-03-20 at 20:50:07ID: 10642860

A swing and a miss.

I'd thought about delimiters as well, but couldn't see that anything might conflict with a standard.
I tried your suggestion anyway and still came up short.

SELECT tblItem.ItemName, tblItem.ItemPartNum, tblItem.ItemActive, tblItem.ItemPrice, tblItem.ItemSupp, tblItem.ItemDesc, tblItem.ItemShortDesc, tblItem.ItemPic, tblItem.ItemThumb, tblItem.ItemALT, tblItem.ItemMan FROM [tblItem]
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC Microsoft Access Driver] Syntax error in FROM clause.


Thanks for playing!!  :)
bvinson

 

by: adilkhanPosted on 2004-03-20 at 21:21:32ID: 10642928

Try

SELECT tbl.ItemName, tbl.ItemPartNum, tbl.ItemActive, tbl.ItemPrice, tbl.ItemSupp, tbl.ItemDesc, tbl.ItemShortDesc, tbl.ItemPic, tbl.ItemThumb, tbl.ItemALT, tbl.ItemMan FROM tblItem as tbl

 

by: bvinsonPosted on 2004-03-20 at 21:25:57ID: 10642936

Sorry, no dice.

The output:
SELECT tbl.ItemName, tbl.ItemPartNum, tbl.ItemActive, tbl.ItemPrice, tbl.ItemSupp, tbl.ItemDesc, tbl.ItemShortDesc, tbl.ItemPic, tbl.ItemThumb, tbl.ItemALT, tbl.ItemMan FROM tblItem as tbl
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC Microsoft Access Driver] Syntax error in FROM clause.

I didn't know you could structure a SQL statement like this....and it looks like Access didn't either...but I was willing to give it the ole' college try.

bvinson

 

by: fozyletPosted on 2004-03-20 at 21:33:23ID: 10642945

Not as a solution, but just out of curiosity...

Does this work? SELECT * FROM tblItem

do inform if you settle this out-of-court!

 

by: adilkhanPosted on 2004-03-20 at 21:33:34ID: 10642947

Syntax is Correct, I would Start Dbugging by Grabbing only one Column and then keep on Adding to see where the Problem happens.
Also try Select * from tblItem and see what happens

 

by: bvinsonPosted on 2004-03-20 at 21:40:12ID: 10642964

Negative on the SELECT * FROM tblItem.

adikhan - thank you for your additional suggestion, but it unfortunately fails as well.

I couldn't grab any of the fields - but this exact same statement succeeds on another page in the same directory, using the same db connection include file.  The only thing that has changed it the name of the Recordset object and when I try to name it the same thing as the working one I get the same error.

bvinson

 

by: adilkhanPosted on 2004-03-20 at 21:43:58ID: 10642969

Problem Could be your Recordset Object is Assigned as a Session Object or Defined Twice or some Other SQL statement was Assigned to it already.

Post your RS object and some of your Page source.

 

by: adilkhanPosted on 2004-03-20 at 21:45:15ID: 10642971

Maybe the name you using for your Recordset object is a reserved word.

 

by: fozyletPosted on 2004-03-20 at 21:46:26ID: 10642973

bvinson,
can't imagine why it would not work!
may i suggest checking the spellings (may be missed smthing... like TBIITEM instead of TBLITEM)

 

by: bvinsonPosted on 2004-03-20 at 21:58:25ID: 10642985

adikhan:
I did a search in the file, and the below code has all the references to this recordset.  It is not previously defined, specified, addressed or referenced prior to what I have pasted below.

The name of the recordset is rsProdInfo, and it isn't reserved, I've also tried just a generic objRS and simply RS.  None of these work either.

fozylet:
I copied the SQL statement out of Access after about the 20th time of getting this error to make sure the spelling was correct.  The table name in Access is, indeed tblItem, and "SELECT * FROM tblItem" is about as easy as it gets, but still it crashes out.  (Don't worry, I don't let SELECT * stay in any of my code.)

I really appreciate your help - both of you.

=======Copy and Paste from UltraEdit (yes, I hand-code everything)==========

<%
       strSQL = "SELECT * from tblItem"
      response.write strSQL
             set rsProdInfo = Server.CreateObject("ADODB.Recordset")
             rsProdInfo.Open strSQL, objConn, adOpenStatic, adLockOptimistic, adCmdTable
 
             intTotal = 0
 
             rsProd.MoveFirst
             while not rsProd.EOF
                 rsProdInfo.MoveFirst
                 rsProdInfo.Find "productID = " & rsProd("productID")
                 intProdID = rsProd("productID")
                 strProdName = rsProdInfo("productName")
                 intPrice = formatNumber(rsProdInfo("productPrice"), 2)
                 intQuant = rsProd("quantity")
                 intExtPrice = formatNumber((intPrice * intQuant), 2)
                 intTotal = intTotal + intExtPrice
 %>
                 <tr>
                     <td width="15%" align="left" valign="middle" nowrap><font face="Verdana" size="2"><%= intQuant %></font></td>
                     <td width="15%" align="left" valign="middle" nowrap><font face="Verdana" size="2"><%= intProdID %></font></td>
                     <td width="40%" align="left" valign="middle" nowrap><font face="Verdana" size="2"><%= strProdName %></font></td>
                     <td width="15%" align="right" valign="middle" nowrap><font face="Verdana" size="2">$<%= intPrice %></font></td>
                     <td width="15%" align="right" valign="middle" nowrap><font face="Verdana" size="2">$<%= intExtPrice %></font></td>
                 </tr>
                 <input type="hidden" name="strOrderItem" value="<%= intProdID %>,<%= intQuant %>">
<%
                rsProd.MoveNext
            wend                        
%>
<%
                  'display total for products in cart
%>                        
            <tr>
                <td colspan="4" align="left" valign="middle" nowrap><font face="Verdana" size="2">Subtotal:</font></td>
                <td align="right" valign="middle" nowrap><font face="Verdana" size="2">
                    $<%= formatNumber(intTotal, 2) %>
                </font></td>
            </tr>
<%
                  'add and display amount charged for shipping:
                  'in this case it's 5% of total for products in cart
                  'change the .05 to meet your requirements
%>                        
            <tr>
                <td colspan="4" align="left" valign="middle" nowrap><font face="Verdana" size="2">Shipping (5%):</font></td>
                <td align="right" valign="middle" nowrap><font face="Verdana" size="2">
                    $<%= formatNumber((intTotal * .05), 2) %>
                    <input type="hidden" name="intShipping" value="<%= formatNumber((intTotal * .05), 2) %>">
                </font></td>
            </tr>
<%
                  'add and display amount charged for sales tax:
                  'in this case it's 8% of total for products in cart
                  'change the .08 to meet your state/province requirements
%>                          
            <tr>
                <td colspan="4" align="left" valign="middle" nowrap><font face="Verdana" size="2">Tax (8%):</font></td>
                <td align="right" valign="middle" nowrap><font face="Verdana" size="2">
                    $<%= formatNumber((intTotal * .08), 2) %>
                    <input type="hidden" name="intTax" value="<%= formatNumber((intTotal * .08), 2) %>">
                </font></td>
            </tr>
<%
                  'display Grand Total: to get the multiplier 1.0 is the product(s) total plus .08
                  'for sales tax and .05 for shipping which equals 1.13. Be sure to change this
                  'to meet your requirements
%>              
            <tr>
                <td colspan="4" align="left" valign="middle" nowrap><font face="Verdana" size="2"><b>Total:</b></font></td>
                <td align="right" valign="middle" nowrap><font face="Verdana" size="2"><b>
                    $<%= formatNumber((intTotal*1.13), 2) %>
                    <input type="hidden" name="intTotal" value="<%= formatNumber((intTotal * 1.13), 2) %>">
                </b></font></td>
            </tr>
            </table>        
            <p><font face="Verdana" size="4"><strong>Payment/Shipping Information</strong></font></p>
            <table width="100%">
            <tr>
                <td bgcolor="#ff9900" colspan="2"><font color="#FFFFFF" face="Verdana" size="2" style="background-color: #ff9900"><strong>Customer Information</strong></font></td>
                  </tr>
            <tr>
                <td><font face="Verdana" size="2">Name(First, Last): </font></td>
                <td>
                <input type="text" name="strFirst" size="10">
                <input type="text" name="strLast" size="10">
                </td>
            </tr>
            <tr>
                <td><font face="Verdana" size="2">E-mail Address: </font></td>
                <td>
                <input type="text" name="strEmail" size="21"><font face="Verdana" size="1">&nbsp;Example: user@metalinks.com</font>
                </td>
            </tr>
            <tr>
                <td><font face="Verdana" size="2">Street Address: </font></td>
                <td>
                <input type="text" name="strAddress1" size="21">
                </td>
            </tr>
            <tr>
                <td><font face="Verdana" size="2">P.O. Box/Rural Route: </font></td>
                <td>
                <input type="text" name="strAddress2" size="21"><font face="Verdana" size="1">&nbsp;Enter &quot;NA&quot; if not applicable</font>
                </td>
            </tr>
            <tr>
                <td><font face="Verdana" size="2">City, State, Postal Code: </font></td>
                <td>
                <input type="text" name="strCity" size="10">
                <input type="text" name="strState" size="5">
                <input type="text" name="strPostalCode" size="5">
                </td>
            </tr>
            <tr>
                <td><font face="Verdana" size="2">Country: </td>
                <td>
                <input type="text" name="strCountry" size="21">
                </td>
            </tr>
            <tr>
                <td><font face="Verdana" size="2">Telephone: </font></td>
                <td>
                <input type="text" name="strPhone" size="21"><font face="Verdana" size="1">&nbsp;Example: 512-555-5555</font>
                </td>
            </tr>
            <tr>
            <td colspan="2"><hr color="#CCCCCC" size="1" noshade></td>
            </tr>
            <tr>
                <td bgcolor="#ff9900" colspan="2"><font color="#FFFFFF" face="Verdana" size="2" style="background-color: #ff9900"><strong>Shipping Information (if different than Customer Information)</strong></font></td>
                  </tr>
                  <tr>
                <td><font face="Verdana" size="2">Name(First, Last): </font></td>
                <td>
                <input type="text" name="strShipFirst" size="10">
                <input type="text" name="strShipLast" size="10">
                </td>
            </tr>
            <tr>
                <td><font face="Verdana" size="2">Address: </font></td>
                <td>
                <input type="text" name="strShipAddress" size="21">
                </td>
            </tr>
            <tr>
                <td><font face="Verdana" size="2">City, State, Postal Code: </font></td>
                <td>
                <input type="text" name="strShipCity" size="10">
                <input type="text" name="strShipState" size="5">
                <input type="text" name="strShipPostalCode" size="5">
                </td>
            </tr>
            <tr>
                <td><font face="Verdana" size="2">Country: </td>
                <td>
                <input type="text" name="strShipCountry" size="21">
                </td>
            </tr>
                  <tr>
            <td colspan="2"><hr color="#CCCCCC" size="1" noshade></td>
            </tr>
                  <tr>
                <td bgcolor="#ff9900" colspan="2"><font color="#FFFFFF" face="Verdana" size="2" style="background-color: #ff9900"><strong>Shipping Method</strong></font></td>
                  </tr>
                  <tr>
                <td colspan="2"><font face="Verdana" size="2">
                <input type="radio" name="strShipMethod" value="UPS" CHECKED>
                United Parcel Service
                <input type="radio" name="strShipMethod" value="FedEx">
                Federal Express
                </font></td>
            </tr>
            <tr>
            <td colspan="2"><hr color="#CCCCCC" size="1" noshade></td>
            </tr>
           
            <tr>
                <td colspan="2" align="center">
                <input type="submit" value="Submit Order" id="submit1" name="submit1">
                </td>
            </tr>
            </table>            
            </form>
            </td>
  </tr>
  </table>
  </td>
  </tr>
  </table>
      <hr color="#CCCCCC" size="1" noshade>
     
<table border="0" cellpadding="0" cellspacing="6" width="100%">  
  <tr>
    <td colspan="3" valign="BOTTOM"><font face="Verdana, Arial, Helvetica" size="1">      
     
      Last Updated: <!--webbot bot="Timestamp" s-type="EDITED" s-format="%A, %B %d, %Y" startspan -->Saturday, July 07, 2001<!--webbot bot="Timestamp" endspan i-checksum="49640" -->
      <br>
      Powered by <a href="http://metalinks.com/metacart.htm">MetaCart</a>,
      ©2000-2001 <a href="http://metalinks.com/">MetaLinks.com</a><br>
      </font></td>
  <td colspan="3" align="right" valign="TOP">&nbsp;
  </td>
  </tr>
</table>
</body>
</html>
<%            
rsProd.Close
set rsProd = Nothing

rsProdInfo.Close
set rsProdInfo = Nothing
            end if
      end if
end if

Conn.Close
set objConn = Nothing
%>

=========End Copy and Paste==============

Thanks again,
bvinson

 

by: adilkhanPosted on 2004-03-20 at 22:13:47ID: 10643012

> rsProdInfo.Open strSQL, objConn, adOpenStatic, adLockOptimistic, adCmdTable

you are using objConn as your Connection Object , but why you doing Conn.Close on the Bottom?

Conn is your Connection object or objConn.

 

by: bvinsonPosted on 2004-03-20 at 22:44:39ID: 10643069

Hadn't bedebugged it that far down.

objConn is the correct object.  I had been tying to change things up testing for this error.

 

by: adilkhanPosted on 2004-03-20 at 22:49:23ID: 10643075

Post the Code for rsProd as well.

 

by: bvinsonPosted on 2004-03-20 at 22:53:17ID: 10643082

The ful file is on its way to your email account.

bvinson

 

by: bvinsonPosted on 2004-03-20 at 23:21:45ID: 10643138

Found it!!

It was a wrong CursorType on the rsProdInfo query.

Changed that bad boy out and it slipped right through.

Again, I appreicate your help.

bvinson

 

by: acperkinsPosted on 2004-03-21 at 10:31:10ID: 10644725

Actually and not to quible (as I think you know this, but for everone else's sake), but there is nothing wrong with the CursorType (adOpenStatic), but the Options parameter for the Recordset's Open method.  And more specifically the CommandTypeEnum used (adCmdTable).  

In other words this line:
rsProdInfo.Open strSQL, objConn, adOpenStatic, adLockOptimistic, adCmdTable

Should have been written:
rsProdInfo.Open strSQL, objConn, adOpenStatic, adLockOptimistic, adCmdText

amp,
Fair enough.

 

by: ee_ai_constructPosted on 2004-03-25 at 09:17:03ID: 10678998

Closed, 250 points refunded.
ee_ai_construct
Community Support Moderator
(re-order part number xm34)

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...