Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 13th, 2004, 08:26 AM
Registered User
 
Join Date: Jun 2004
Location: Mohali, Panjab, India.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default error in FROM clause

sir,

i'm writing an application with the following code

mySQL = "SELECT start_date AS Date,"_
& "SUM(Ceil(round(duration/60,2))) AS Minutes "_
& "FROM account "_
& "WHERE (duration is not null) "_
& "GROUP BY start_date "
Dim objrs
Set objRS = Server.CreateObject("ADODB.Recordset")

objRS.Open mySQL, myConn, , , adCmdTable


however it gives the error
"error in FROM clause
plz help
thanx
Reply With Quote
  #2 (permalink)  
Old July 13th, 2004, 08:57 AM
Friend of Wrox
 
Join Date: Oct 2003
Location: Cochin, Kerala, India.
Posts: 463
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to madhukp
Default

Dear Amrit,

1) Please make sure that the table account exists.

2) Date is a keyword. You cannot use that as the alias for a column / expression. Either use some other aliase such as myDate or use [Date].

3) I think account is also a keyword. I am not sure. Please put it in square brackets ([account]) and try.
Reply With Quote
  #3 (permalink)  
Old July 13th, 2004, 09:14 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi there,

Do a response.write of your sql statement to see if it is contructed without any issues. And try running that directly in your DB and see if that produces the same error or runs successully.

adCmdTable - Have the provider generate an SQL query and return all rows from the specified table

adCmdText = Evaluate as a textual definition

Try adCmdText there. Take a look at this page Recordset.Open method

Cheers!

_________________________
- Vijay G
Strive for Perfection
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Syntax error in FROM clause: asp jpindi ASP.NET 1.0 and 1.1 Basics 6 July 16th, 2008 12:30 AM
update query error in from clause prasath15@yahoo.co.in Classic ASP Databases 1 June 6th, 2005 06:02 AM
error '80040e14' Syntex error in From clause alisonchase Access ASP 5 January 2nd, 2005 10:56 AM
Syntax error in query. Incomplete query clause. dispickle ADO.NET 3 April 16th, 2004 01:04 PM
More than 1 WHERE clause? onlyu2 MySQL 1 March 26th, 2004 01:48 PM



All times are GMT -4. The time now is 08:03 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.