Visual Basic app to connect to an online database

Doom 21 Reputation points
2021-07-20T18:57:22.98+00:00

Hey Microsoft Community,

I have an app with a login (name, email, and password) form and since it's hard to keep track of how many users are using the app, I want to know if it's possible and how to connect my Visual Basic application to an online database where I can access it. The app is made in Visual Basic 2010 Express Edition and I would need some advice on how to do this database + some good online, 24/7 database hosting services. Searched all over youtube but looks like an open desert with no answers.

Thanks for reading and please help me with this, I would really use a database.

Azure SQL Database
VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,564 questions
{count} votes

Accepted answer
  1. Alberto Morillo 32,806 Reputation points MVP
    2021-07-20T21:30:44.51+00:00

    Here you will find how to create an Azure SQL Database, 24 x 7, and starts with approximately USD$5/month (basic tier). Make sure to add your current Internet IP address to the whitelist of Azure SQL Database firewall so your application can connect from your location. Use this documentation to configure Azure SQL firewall.

    Download and install SQL Server 2012 Native Client from here.

    Modify the connection string for your application:

    Private Function GetSqlServerConnectionString() As String
    GetSqlServerConnectionString = "Driver={SQL Server Native Client 11.0};" _
    & "Server=tcp:YourAzureSQLServerName.database.windows.net,1433;" _
    & "Database=YourDatabaseName;" _
    & "Uid=YourAzureSQLAdminUser;" _
    & "Pwd={xxxxxxxx};" _
    & "Encrypt=yes;" _
    & "Connection Timeout=30;"
    End Function

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Sam of Simple Samples 5,516 Reputation points
    2021-07-21T02:29:45.207+00:00

    Creating and connecting to an Azure database is the easy part. There are abundant resources about that. For one thing, most anything showing how to connect to a SQL Server database can be used to connect to an Azure database; you simply use an appropriate connection string.

    The hard part is keeping track of who is using the app. Is this one system executing many instances of the application? Probably not. I assume it is many systems, each executing separate instances. So you need to have a way for them to communicate. You can do that using a peer-to-peer mechanism (which would be too complicated) or you can create a server that each of them communicates with. Where will that server be? You can create a service in Azure that provides that.

    0 comments No comments

  2. Sam of Simple Samples 5,516 Reputation points
    2021-07-21T02:59:51.783+00:00

    I did a little research and found Application Insights. I know nothing except what that page and the following says.

    0 comments No comments