Difference in SQL Syntax between Access and MySQL (from VB6 project using ADO)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Michael Cole

    #16
    Re: Difference in SQL Syntax between Access and MySQL (from VB6 project using ADO)

    KwikOne wrote:[color=blue]
    > Actually the problem is the field name 'Set' since that is a Reserved
    > word. In MySQL you would need to ensure the field name was enclosed in
    > back-ticks such as `Set`.[/color]

    Backticks! Now that is _ugly_. Brackets, parenthesis, braces, quotes,
    double-quotes - fine. Confusing maybe, but fine. Who the hell came up with
    the MySQL idea. I'm glad I've never had to work with it, if that is an
    example of its syntax.




    --
    Regards,

    Michael Cole


    Comment

    • Bill Karwin

      #17
      Re: Difference in SQL Syntax between Access and MySQL (from VB6 projectusing ADO)

      Michael Cole wrote:[color=blue]
      > KwikOne wrote:
      >[color=green]
      >>Actually the problem is the field name 'Set' since that is a Reserved
      >>word. In MySQL you would need to ensure the field name was enclosed in
      >>back-ticks such as `Set`.[/color]
      >
      > Backticks! Now that is _ugly_. Brackets, parenthesis, braces, quotes,
      > double-quotes - fine. Confusing maybe, but fine. Who the hell came up with
      > the MySQL idea.[/color]

      Yes, it is unfortunate. The ANSI SQL 92 standard for delimited
      identifiers is double-quotes. But if one has implemented a DBMS that
      uses double-quotes for string delimiters, then you risk breaking
      everyone's existing code if you change the meaning of those symbols. So
      the solution is to use some other symbol.

      InterBase, for example, solved this problem in a different way when they
      implemented delimited identifiers. They created a connection-level
      property called "sql dialect" that allows applications to switch between
      the old behavior of double-quotes (as string delimiters) and the new
      behavior (as identifier delimiters); the default was the old behavior,
      so their customers' existing apps wouldn't break.

      Regards,
      Bill K.

      Comment

      • Bill Karwin

        #18
        Re: Difference in SQL Syntax between Access and MySQL (from VB6 projectusing ADO)

        Bill Karwin wrote:[color=blue]
        > the solution is to use some other symbol.
        > InterBase, for example,[/color]

        Sorry -- that wasn't clear, because InterBase is not an example of using
        a different symbol like MySQL did. InterBase's solution is an
        alternative to that. Just want to be clear.

        Regards,
        Bill K.

        Comment

        • Ralph

          #19
          Re: Difference in SQL Syntax between Access and MySQL (from VB6 project using ADO) - OT


          "Bill Karwin" <bill@karwin.co m> wrote in message
          news:din4r4011r 1@enews3.newsgu y.com...[color=blue]
          > Bill Karwin wrote:[color=green]
          > > the solution is to use some other symbol.
          > > InterBase, for example,[/color]
          >
          > Sorry -- that wasn't clear, because InterBase is not an example of using
          > a different symbol like MySQL did. InterBase's solution is an
          > alternative to that. Just want to be clear.
          >
          > Regards,
          > Bill K.[/color]

          This is OT but I vaguely remember some non-ANSI SQL that used nested single
          and double quotes, a la JavaScript, that you could alternate to get even
          deeper...
          "Outer stuff 'medium stuff "lower stuff 'innerstuff'"'" . The escape was to
          double up on the quote. It was a nightmare. <g>

          Do you or anyone remember what database that was?

          Just curious.

          -ralph



          Comment

          Working...