Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB Databases
|
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 January 22nd, 2004, 01:47 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 128
Thanks: 0
Thanked 0 Times in 0 Posts
Default What is wrong with this Query? Section?

I have an Access 2K database and query that joins two table, qryCoilUsage.

When attempting to execute a specific query againt the query, "SELECT * FROM qryCoilUsage WHERE Line Like '%' AND Section Like 'Z%'" I recieve an error message "method of object ~" etc.

The query is being executing in ADO thus the % and not the *

This problem is odd!?!

I am not aware of Section being a keyword. But, as a preventitive measure I prefixed it with the table name. This resulted in the same error.

This query is dynamic and doesn't always include the Section column the only time the problem exists is on the Section column. I changed the name of the column to Secttion and the query accordingly, just to humor myself, and it executed fine.

I also ran the query in Access and it ran fine as well. Yes, I had to change the % to an *.

So, I suspect the problem is in the ADO object and somehow related to word Section?

Any help would be greatly appreciated.

Thanks in advance,

Larry

Larry Asher
__________________
Larry Asher
 
Old January 23rd, 2004, 10:23 AM
Authorized User
 
Join Date: Jul 2003
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alex_read
Default

Looks lile section is reserved for ODBC & SQL Server so I guess this follows through to the ADO libraries also:

http://aspfaq.com/show.asp?id=2080

http://msdn.microsoft.com/library/de...ra-rz_9oj7.asp

 
Old January 23rd, 2004, 10:37 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 128
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The documentation was great! I really appreciate you taking the time to reply. Thanks

Larry Asher
 
Old February 9th, 2004, 05:53 AM
Registered User
 
Join Date: Feb 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi!!
U may be right. try to put the word section like this in the query [section]... e.g.
the query written below runs fine both is SQL and in Access 2K.

select * from [com-link] where [sn] like '*' and [desc] like 'd*'

Bye
Arnab





Similar Threads
Thread Thread Starter Forum Replies Last Post
What is wrong with following Insert Query? [email protected] VB.NET 2002/2003 Basics 1 September 19th, 2006 04:41 PM
What is wrong with this query?... rupen Access 5 April 30th, 2006 01:28 AM
Query on the wrong data type ggiibboo VB Databases Basics 1 January 31st, 2006 07:44 PM
Wrong result on select query penta Access 3 May 5th, 2005 09:05 AM
What`s wrong with Query??? :( Varg_88 Classic ASP Basics 8 January 18th, 2005 09:41 AM





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