{"id":22065549,"url":"https://github.com/karenpayneoregon/baseconnectionsvisualbasicnet","last_synced_at":"2026-03-05T06:02:04.223Z","repository":{"id":110840365,"uuid":"169341448","full_name":"karenpayneoregon/BaseConnectionsVisualBasicNet","owner":"karenpayneoregon","description":"Code sample for easily forming common data connections","archived":false,"fork":false,"pushed_at":"2020-07-30T21:29:00.000Z","size":35,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-07T21:24:31.415Z","etag":null,"topics":["connection","csharp","database-connector","ms-access","oracle","sql-server","vbnet"],"latest_commit_sha":null,"homepage":"","language":"Visual Basic .NET","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/karenpayneoregon.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-02-06T01:41:47.000Z","updated_at":"2025-04-02T04:41:53.000Z","dependencies_parsed_at":"2023-08-09T17:18:13.077Z","dependency_job_id":null,"html_url":"https://github.com/karenpayneoregon/BaseConnectionsVisualBasicNet","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/karenpayneoregon/BaseConnectionsVisualBasicNet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karenpayneoregon%2FBaseConnectionsVisualBasicNet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karenpayneoregon%2FBaseConnectionsVisualBasicNet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karenpayneoregon%2FBaseConnectionsVisualBasicNet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karenpayneoregon%2FBaseConnectionsVisualBasicNet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/karenpayneoregon","download_url":"https://codeload.github.com/karenpayneoregon/BaseConnectionsVisualBasicNet/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karenpayneoregon%2FBaseConnectionsVisualBasicNet/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30111779,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T03:40:26.266Z","status":"ssl_error","status_checked_at":"2026-03-05T03:39:15.902Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["connection","csharp","database-connector","ms-access","oracle","sql-server","vbnet"],"created_at":"2024-11-30T19:19:28.349Z","updated_at":"2026-03-05T06:02:04.210Z","avatar_url":"https://github.com/karenpayneoregon.png","language":"Visual Basic .NET","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Base connection library (VB.NET/C#)\n\nThis repository is for base classes used for connecting to both SQL-Server, MS-Access and Oracle databases using several classes for both easily creating connections along with a generalized method to detect runtime exceptions.\n\n\u003e This code may not suit every developer's need and also may seem like overkill to the novice developer. The intent is to have a base class that can be used in any project in one or more Visual Studio solutions. Although the code is VB.NET, the base library can be used with C# also.\n\n## Getting started\n- Add the class project [KarenBase](https://github.com/karenpayneoregon/BaseConnectionsVisualBasicNet/tree/master/KarenBase) to your Visual Studio solution, rename the project if so desired.\n- Add a reference to KarenBase to your Windows forms project.\n- ***Set*** `DatabaseServer` to your server e.g. KARENS-PC or for SQL-Server Express .\\SQLEXPRESS\n- ***Set*** `DefaultCatalog` to the targeted database in the server above.\n- Follow the example in the project SampleSqlConnection for SQL-Server. MS-Access example to follow.\n\n## Test projects\nSee the following [repository](http://example.com) which focuses more on using this library \nwith C# but does have a VB.NET project for SQL-Server.\n\n### Requires\n- Microsoft Visual Studio 2015 or higher.\n\n### Tips\n- [IsSuccessFul](https://github.com/karenpayneoregon/BaseConnectionsVisualBasicNet/blob/master/KarenBase/Classes/BaseExceptionProperties.vb) from the base exception class allow a type to be returned from a function such as a [List(Of T)](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.list-1?view=netframework-4.7.2) or [DataTable](https://docs.microsoft.com/en-us/dotnet/api/system.data.datatable?view=netframework-4.7.2) without the need to be concerned with if there had been a runtime exception as after the method calls and before using the return item check IsSuccessFul.\n\n```csharp\nImports SampleSqlConnection.Classes\n\nPublic Class Form1\n    Private Sub testConnectionButton_Click(sender As Object, e As EventArgs) _\n        Handles testConnectionButton.Click\n\n        Dim ops As New DataOperations\n        ops.ReadAllCustomersIntoDataTable()\n\n        If ops.IsSuccessFul Then\n            ' use the return type\n        Else\n            ' don't use the return type\n        End If\n    End Sub\nEnd Class\n```\nSimple example for Oracle\n```csharp\nPublic Class DataOperations\n    Inherits OracleConnection\n\n    Public Sub New()\n        DataServer = \"MyOracleDB\"\n        UserId = \"myUsername\"\n        Password = \"myPassword\"\n    End Sub\nEnd Class\n```\n**New edition**\nStarted work on a generic connection open test class named ConnectionClasses, more to follow.\n\n```csharp\nImports BaseConnectionLibrary.ConnectionClasses\n\nPublic Class Form1\n    Private Sub sqlServerExistsButton_Click(sender As Object, e As EventArgs) _\n        Handles sqlServerExistsButton.Click\n\n        Dim mockedConnectionString =\n                \"Data Source=KARENS-PC;\" \u0026\n                \"Initial Catalog=NorthWindAzure3;\" \u0026\n                \"Integrated Security=True\"\n        Dim ops As New ConnectionValidator\n        Dim result = ops.OpenTest(Providers.SQLClient, mockedConnectionString)\n        If result Then\n            MessageBox.Show(\"Connection opened successfully\")\n        Else\n            If ops.HasException Then\n                MessageBox.Show(\n                    $\"Failed opening connection{Environment.NewLine}{ops.LastExceptionMessage}\")\n            End If\n        End If\n    End Sub\nEnd Class\n```\n\nFor a C# version of this library see [the following repository](https://github.com/karenpayneoregon/BaseConnectionsCS).\n\n## NuGet package\n\nPM\u003e Install-Package BaseConnectionLibrary -Version 1.0.3\n\n- 3-22-2019 added a wider range of supported Frameworks.\n- 3-22-2019 added ability for SQL-Server connection to use user name and password.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarenpayneoregon%2Fbaseconnectionsvisualbasicnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkarenpayneoregon%2Fbaseconnectionsvisualbasicnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarenpayneoregon%2Fbaseconnectionsvisualbasicnet/lists"}