DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2
  1. #1
    Jean-Claude LEPOT Guest

    Sending a query to ADO with then character 39 :'


    I can't send a query to an ADO object if the query text contain the character
    ascii 39. I'had try to double it (it works well when i work with the net
    library accessing SQL Server Databases) but it occurs an error in this case
    also.

    The only solution i find is to send a query with db library, on doubling
    the caracter to obtain the ID (field as int primary key), then i make a new
    query to find this ID in the ADO object... I works but it is'nt very nice,
    no ?

    Thank's if you have a solution.

  2. #2
    Bill Vaughn Guest

    Re: Sending a query to ADO with then character 39 :'


    I call this the "O'Malley" problem. It can be solved by letting ADO handle
    the parameters for you (via a Command object and a Parameters collection)
    or by doubling the single quote. If done right, either technique works.

    bv

    "Jean-Claude LEPOT" <jclepot@wineandco.com> wrote:
    >
    >I can't send a query to an ADO object if the query text contain the character
    >ascii 39. I'had try to double it (it works well when i work with the net
    >library accessing SQL Server Databases) but it occurs an error in this case
    >also.
    >
    >The only solution i find is to send a query with db library, on doubling
    >the caracter to obtain the ID (field as int primary key), then i make a

    new
    >query to find this ID in the ADO object... I works but it is'nt very nice,
    >no ?
    >
    >Thank's if you have a solution.



Similar Threads

  1. But..Re: Pass value to ADO query
    By Tom Wilson in forum VB Classic
    Replies: 0
    Last Post: 10-06-2000, 03:06 PM
  2. But..Re: Pass value to ADO query
    By Mike in forum VB Classic
    Replies: 0
    Last Post: 10-06-2000, 01:48 PM
  3. ADO - T-SQL - Stored Proc Question
    By Neil Whitlow in forum VB Classic
    Replies: 2
    Last Post: 08-23-2000, 01:24 AM
  4. Stored Procedure - ADO - T-SQL Question
    By Neil Whitlow in forum Database
    Replies: 3
    Last Post: 08-20-2000, 11:38 AM
  5. ADO query timeout
    By chaumette in forum VB Classic
    Replies: 2
    Last Post: 03-31-2000, 11:09 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links