1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

VB.net application connected to a MySQL database

Discussion in 'Programming' started by {scsi}, Jun 13, 2008.

  1. #1
    Hi all,
    I am writing a program in VB.net 2008 and I want its users to be able to connect to a MySQL database on my host to alter specific fields there.

    Anyone knows how to establish this connection?
     
    {scsi}, Jun 13, 2008 IP
  2. itcn

    itcn Well-Known Member

    Messages:
    795
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    118
    #2
    Set the connection string in your web.config file like this:

    <appSettings>
    <add key="mySQLDSN" value="Driver={MySQL ODBC 3.51 Driver}; Server=YOUR_SERVER_OR_IP; Database=BD_NAME;uid=DB_USER; pwd=DB_PASS;" />
    </appSettings>

    Then open the connection like this:

    Dim myODBCConnection as New OdbcConnection(ConfigurationManager.AppSettings("mySQLDSN"))
    Dim myODBCCommand as New OdbcCommand
     
    itcn, Jun 14, 2008 IP
  3. {scsi}

    {scsi} Member

    Messages:
    77
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    43
    #3
    Ok, now how do I alter the database data? What tools do I need and what code please?
     
    {scsi}, Jun 14, 2008 IP
  4. itcn

    itcn Well-Known Member

    Messages:
    795
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    118
    #4
    itcn, Jun 14, 2008 IP
  5. it career

    it career Notable Member

    Messages:
    3,562
    Likes Received:
    155
    Best Answers:
    0
    Trophy Points:
    270
    #5
    VB.NET has ways to access database , you do not need any tool you need to code it using VB.NET .
     
    it career, Jun 14, 2008 IP