Wrox Programmer Forums
|
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 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
 
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?
 
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





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 10: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





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