redho home | products | services

Programming Forums


Community for Java, PHP, Perl C, ASP and Python programmers
Monday 15 October 2018 21:35

Ask your IT question here

Why do I get 80040E0C errors?



 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Programming Forums -> ASP in depth
View previous topic :: View next topic  
Author Message
Zorro
Guest Programmer




Why do I get 80040E0C errors?
Reply with quote
 
tom
Guest Programmer




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
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Programming Forums -> ASP in depth


Dubai Forums - Expat Help | Vegan Forum | Java Programming | 3d Design Resources | 3d Forum | 3D Jobs | 3D Textures | Paris Forum | Europe Forum
Dubai Classifieds | Dubai Property | Jobs in Dubai | Free London Classifieds | Jobs in London UK

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

© 2018 RedHo