Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB Databases
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Pro VB Databases Advanced-level VB coding questions specific to using VB with databases. Beginning-level questions or issues not specific to database use will be redirected to other forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB Databases section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old May 14th, 2010, 03:12 PM
Registered User
 
Join Date: May 2010
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation Syntax error in FROM clause.

Here is the code I am running, and i have an active connection VSGSAMDB previously opened. so that is not an issue:
strSAMTotCntSql - declared before
Dim MDBInfoCMD As ADODB.Command
Dim lngInfoCnt As Integer

Set VGInfoTable = New ADODB.Recordset
Set MDBInfoCMD = New ADODB.Command
Set MDBInfoCMD.ActiveConnection = VSGSAMDB

MDBInfoCMD.CommandText = strSAMTotCntSql
strSAMTotCntSql = "SELECT Count([MDB Information].converted) AS Cnt FROM [MDB Information];"

VGInfoTable.Open strSAMTotCntSql, VSGSAMDB, adOpenKeyset, adLockOptimistic, adCmdTable

This query runs perfectly within database, yet I am getting an error message:
err.Description
Syntax error in FROM clause.
err.Number
-2147217900

Can anybody explain/help me on it?
Reply With Quote
  #2 (permalink)  
Old May 15th, 2010, 12:32 AM
Authorized User
 
Join Date: Mar 2009
Posts: 49
Thanks: 0
Thanked 8 Times in 8 Posts
Default

See my answer to you in the database basic forum where you posted the exact same question...



Good Luck
Reply With Quote
Reply


Thread Tools
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
syntax for where clause with like operator Yasho VB.NET 2002/2003 Basics 2 June 11th, 2007 08:34 AM
error '80040e14' Syntex error in From clause alisonchase Access ASP 5 January 2nd, 2005 09:56 AM
error in FROM clause amrit_82 Classic ASP Professional 2 July 13th, 2004 09:14 AM
Syntax error in query. Incomplete query clause. dispickle ADO.NET 3 April 16th, 2004 01:04 PM



All times are GMT -4. The time now is 06:08 AM.


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