VB and MySQL

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • pbpolius@gmail.com

    #1

    VB and MySQL

    I am using VB with Connector/NET to connect to a MySQL database. All
    works fine except when I try to pass the connection string from the
    login form to the main form. It appears that after testing the
    connection with a quick 'conn.open' and 'conn.close' on the login form,
    the password portion of the connection string is lost. Even before it
    gets passed to the main form. How do I prevent this from happening?

    Thanks

  • Cor Ligthert [MVP]

    #2
    Re: VB and MySQL

    Hi,

    We have 3 tips on our website about MySQL, this is one of those.



    It is not about your question, however it covers it enough in my opinion.

    Cor


    <pbpolius@gmail .com> schreef in bericht
    news:1142656364 .992088.89040@i 40g2000cwc.goog legroups.com...[color=blue]
    >I am using VB with Connector/NET to connect to a MySQL database. All
    > works fine except when I try to pass the connection string from the
    > login form to the main form. It appears that after testing the
    > connection with a quick 'conn.open' and 'conn.close' on the login form,
    > the password portion of the connection string is lost. Even before it
    > gets passed to the main form. How do I prevent this from happening?
    >
    > Thanks
    >[/color]


    Comment

    • tommaso.gastaldi@uniroma1.it

      #3
      Re: VB and MySQL



      Hi pbpolius,

      I did the same some time ago and experienced similar problems.
      Actually, there are so many problems with the OLE DB provider I used,
      that at last it was almost unusable.

      May I ask which OleDb provider are you using (a link). The one I used
      is:

      http://dev.mysql.com/downloads/downl...xe&pick=mirror

      at the end, I had to give up with it. In particular, there seems to be
      some major problem with the handling of char codes. Especially, if you
      explore the OleDbschemaGuid , several strange chars appears within the
      name of objects and when imported in VB they cause unexpected
      truncation of the strings.

      Let me know, I would like to share experiences to possibly solve these
      problems... I think it's the OleDb driver fault. Do you know where we
      can download alternative clients?

      tommaso


      pbpolius@gmail. com ha scritto:
      [color=blue]
      > I am using VB with Connector/NET to connect to a MySQL database. All
      > works fine except when I try to pass the connection string from the
      > login form to the main form. It appears that after testing the
      > connection with a quick 'conn.open' and 'conn.close' on the login form,
      > the password portion of the connection string is lost. Even before it
      > gets passed to the main form. How do I prevent this from happening?
      >
      > Thanks[/color]

      Comment

      • dotNuttah

        #4
        Re: VB and MySQL

        Cor Ligthert [MVP] wrote:[color=blue]
        > Hi,
        >[/color]
        We have many tips on our website...[color=blue]
        >
        > http://www.vb-tips.com
        >
        > Cor[/color]

        Howdy Cor :-)

        I have ActiveX disabled in my browser and thus cannot access any tips. :-(


        Comment

        • dotNuttah

          #5
          Re: VB and MySQL

          ps. I wonder if you might like this version of your function.

          function Ajax_GetXMLHttp Request() {
          try { return new XMLHttpRequest( ); } catch (e) {}
          try { return new ActiveXObject(" Msxml2.XMLHTTP" ); } catch (e) {}
          try { return new ActiveXObject(" Microsoft.XMLHT TP"); } catch (e) {}
          return null;
          }

          It doesn't do anything differently, just looks cleaner. :-))


          Comment

          • Ken Tucker [MVP]

            #6
            Re: VB and MySQL

            Hi,

            Could you please post some code on how you are passing the
            connection string.

            Ken
            --------------------
            <pbpolius@gmail .com> wrote in message
            news:1142656364 .992088.89040@i 40g2000cwc.goog legroups.com...[color=blue]
            >I am using VB with Connector/NET to connect to a MySQL database. All
            > works fine except when I try to pass the connection string from the
            > login form to the main form. It appears that after testing the
            > connection with a quick 'conn.open' and 'conn.close' on the login form,
            > the password portion of the connection string is lost. Even before it
            > gets passed to the main form. How do I prevent this from happening?
            >
            > Thanks
            >[/color]


            Comment

            Working...