Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. having a login in a windows form that uses a remote MySql database

having a login in a windows form that uses a remote MySql database

Scheduled Pinned Locked Moved Visual Basic
learningcsharpdatabasemysql
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    malcomhfc
    wrote on last edited by
    #1

    I am learning visual basic, i have asked questions before and got great answers and oping for a little bit of help again if no one is busy :) I am a trainee web designer/developer and have my own website, which i am currently designing. Now i have planned it all out and wish to create a Visual Basic.NET program. I wish for both the website and the program to have the same logins, both using a MySql database. The website is using a simple script by me for the login at the moment. I didn't want to over complicate it, till i have the Vb program connecting to the database too. Heres a simple breakdown: 1. Both website and program use same login credentials and same MySql database. 2. Visual Basic program connect remotely to the Mysql database. ( with a shared host ) The program would go about it by basicly starting with a mysql connection then, accessing both username and password tables and checking is Username.TEXT & Password.TEXT match with the database. Once matches, then load up Mainfrm Sorry for the big message. I have did research on how i would go around doing this. Nothing i can find suggests how i could connect to a remote database on a shared host with (cPanel) Some of the code im using just now to open the connection, but not sure how to connect to my databse :

        Dim connect As New MySqlConnection
        Dim sqlcommands As New MySqlCommand
    
        Dim myConnString As String
        Dim UserID As Integer
    
        myConnString = "server=" & My.Settings.HostIP & ";" \_
    

    My.Settings.HostIP - code i have put in settings file all it contains is my website which doesn't work, of course hehe XD I have the import mysql client. Any help would be great thanks. Ofc im not asking someone to do all the work, just asking for some help or ways to improve what i have.

    D 1 Reply Last reply
    0
    • M malcomhfc

      I am learning visual basic, i have asked questions before and got great answers and oping for a little bit of help again if no one is busy :) I am a trainee web designer/developer and have my own website, which i am currently designing. Now i have planned it all out and wish to create a Visual Basic.NET program. I wish for both the website and the program to have the same logins, both using a MySql database. The website is using a simple script by me for the login at the moment. I didn't want to over complicate it, till i have the Vb program connecting to the database too. Heres a simple breakdown: 1. Both website and program use same login credentials and same MySql database. 2. Visual Basic program connect remotely to the Mysql database. ( with a shared host ) The program would go about it by basicly starting with a mysql connection then, accessing both username and password tables and checking is Username.TEXT & Password.TEXT match with the database. Once matches, then load up Mainfrm Sorry for the big message. I have did research on how i would go around doing this. Nothing i can find suggests how i could connect to a remote database on a shared host with (cPanel) Some of the code im using just now to open the connection, but not sure how to connect to my databse :

          Dim connect As New MySqlConnection
          Dim sqlcommands As New MySqlCommand
      
          Dim myConnString As String
          Dim UserID As Integer
      
          myConnString = "server=" & My.Settings.HostIP & ";" \_
      

      My.Settings.HostIP - code i have put in settings file all it contains is my website which doesn't work, of course hehe XD I have the import mysql client. Any help would be great thanks. Ofc im not asking someone to do all the work, just asking for some help or ways to improve what i have.

      D Offline
      D Offline
      Dimitri Witkowski
      wrote on last edited by
      #2

      This tutorial can help you [^] If you still have errors (after properly initializing the connection string), you should also create mysql user in cPanel and grant connect to the database right.

      M 1 Reply Last reply
      0
      • D Dimitri Witkowski

        This tutorial can help you [^] If you still have errors (after properly initializing the connection string), you should also create mysql user in cPanel and grant connect to the database right.

        M Offline
        M Offline
        malcomhfc
        wrote on last edited by
        #3

        Thanks for the reply, the tutorial looks very helpful. Just about to go read it ;)

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups