CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Thread: " Quot Problem

  1. #1
    Join Date
    Jun 2003
    Location
    India
    Posts
    22

    " Quot Problem

    I have to insert address of customer into SQL Server Database/Access Database containing Double Quote

    Ex:
    Customer Address:
    "XYZ House", New Road, Colony, City.

    How to handle it in Visual Basic for Insert and Update.
    Satish

  2. #2
    Join Date
    Jun 2001
    Location
    Mi
    Posts
    1,249
    You can escape it or use a recordset and "poke" it across ...

  3. #3
    Join Date
    Dec 2002
    Location
    London, UK
    Posts
    1,569
    Use double qoutes.
    e.g.

    SQLStatement = "UPDATE blahblahblah...""XYZ House"", New Road, Colony, City"
    Mike

  4. #4
    Join Date
    Jun 2001
    Location
    Mi
    Posts
    1,249
    Mike,

    I always hesitate on giving that answer because in VBA I can never get it to work ... ADO pukes when I try that ... I end up having to open a recordset and poking the string across that way ...

  5. #5
    Join Date
    Dec 2002
    Location
    London, UK
    Posts
    1,569
    Odd. I've never had a problem. Must be a "bit of bug" in the VBA compiler.
    Mike

  6. #6
    Join Date
    Jun 2001
    Location
    Mi
    Posts
    1,249
    Must be ... Now I have the fun of reworking all my forms because they are too slow with using ADO in VBA ... Doesn't that sound like fun?????

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured