redho home | products | services
Web Design Forums

Web Design Forums  


Web Hosting, Web Design, Software and Web Development Forums  
 FAQFAQ   MemberlistArchive  Log inLog in   RegisterRegister 
         

Why do I get 80040E0C errors?



 
Post new topic   Reply to topic    Web Design Forums -> ASP in depth
View previous topic :: View next topic  
Author Message
Zorro
Guest




Why do I get 80040E0C errors?
  Reply with quote


tom
Guest




Code:
Microsoft OLE DB Provider for ODBC Drivers error '80040e0c' 
Command text was not set for the command object.



This error is usually caused by an empty SQL statement (and does not necessarily deal with the explicit ADODB.Command object). Here is a sample piece of code that will cause this error:

Code:
<%
    set conn = CreateObject("ADODB.Connection")
    conn.open "<connection string>"
 
    ' notice the flip flop of strSQL -> SQLstr
 
    strSQL = "UPDATE table SET dt = CURRENT_TIMESTAMP"
    conn.execute(SQLstr)
 
    ' ...
%>


Using Option Explicit would prevent errors like this from happening (well, actually, using Option Explicit would just cause a different error). Using quick and sensible debugging practices will help determine the cause of many SQL-related errors.
  Reply with quote
Page 1 of 1
Post new topic   Reply to topic    Web Design Forums -> ASP in depth


Dubai Forums - Expat Help | Vegan Chat | Java Programming | Free 3D tutorials and 3d textures | Paris Forum | EU Forum
Free Dubai Classifieds | Free London Classifieds | Jobs in London

High Quality, Custom 3d animation and Web Design solutions Royal Quality Web Hosting Services Vegetarian and Animal Rights news

Powered by phpBB © 2001, 2005 phpBB Group