Results 1 to 4 of 4

Thread: How to connect AlterVista's database to Visual Basic

  1. #1
    Guest

    Question How to connect AlterVista's database to Visual Basic

    Hi,

    We are a project team and we are currently doing a project for a local company, the company wants to have a program that can let them do search and add records whose kinda functions. We have put our database in altervista's phpmyadmin, but we are having trouble connect it to Visual Basic.

    In our previous projects, we did example like this

    Imports System.Data
    Imports System.Data.SqlClient

    Public Class ClassCustomer
    ' these module variables are internal to object
    Dim mDatasetCustomer As New DataSet
    Dim mstrQuery As String
    Dim mdbDataAdapter As New SqlDataAdapter
    Dim mdbConn As SqlConnection
    Dim mstrConnection As String = "workstation id=COMPUTER;packet size=4096;data source=missql.mccombs.utexas.edu;integrated security=False;initial catalog=mis333k_msbcn381;user id=msbcn381;password=Meee@sm123"
    ' define a public read only property for the outside world to access the dataset filled by this class
    Public ReadOnly Property CustDataset() As DataSet
    Get
    ' return dataset to user
    Return mDatasetCustomer
    End Get

    End Property

    The red part is where we connect to our school's server. PS: we don't have any experiences to connect to a third party database server.


    Can Alter Vista team help us on this issue.

    Thank you.

  2. #2
    karl94 is offline AlterVista Staff
    Join Date
    Jan 2015
    Posts
    573

    Default

    You cannot connect to your AlterVista database from the internet, only the PHP scripts on your webspace can use the MySQL database.

  3. #3
    Guest

    Default

    When I using PHP to connect the AlterVista's database, what should I put in the servername, username and password? I know in localhost is like $account=mysql_connects("localhost", "root", "password") Can you give me an example?

  4. #4
    karl94 is offline AlterVista Staff
    Join Date
    Jan 2015
    Posts
    573

Tags for this Thread

Posting Permissions

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

SEO by vBSEO