Link to home
Start Free TrialLog in
Avatar of Sonny G
Sonny G

asked on

VB.net using SqlServer in a commercial application distribution components question

I am writing my first application for commercial distribution. 


I will create it in VB.net using Visual Studio 2022 and the latest SqlServer. After I create the application exe, does the user need to have SqlServer (or a SqlServer  runtime - if there is such a thing) loaded on their machines? What components are needed in the distribution installation? Is there anything that I should know or be aware of?

Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Will the database be on a server accessible on the network? If that's the case and if your are using ADO.Net, there is nothing else to distribute.
Avatar of Sonny G
Sonny G

ASKER

Thanks for your quick reply!

I prototyped it in Access with a lot of VBA code and several modules simply to simply perfect a flow before rewriting it in ..Net.

It will be a very simple application that has 2 tables, 9 forms, about a dozen queries and 9 reports. I was thinking of simply downloading SqlServer2019 Express as the database.

This application will be for the non-corporate user and will serve a singular purpose and be very inexpensive.

I have never distributed a VB.net exe before.

I appreciate your mentorship.

SOLUTION
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Sonny G

ASKER

Thanks for your help!

I have created .NET applications before but there was always a resident SqlServer to fetch and put data into tables.

So if i create a .net exe for distribution, then, if I understand it, SqlServer must also be installed on the host machine?

If I use an access database for tables only, it was my impression that the host machine would have to have Access installed or have a runtime version of Access has to be installed.

It sounds like SQLite is my only option because even SQL Server LocalDB needs an installation. Is SQLite compiled into the .NET application or simply "travels" with the exe as another file to be accessed??

I am confused. I apologize.

I really appreciate you guys!


SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Sonny G

ASKER

Thank you, David and Eric ! Your advice is rock-solid. I appreciated your guidance.

But, I think that I will be using SQLite. This very simple application is geared to a non-sophisticated audience. I have to make this installation of the software as simple and effortless as possible.

>>So if i create a .net exe for distribution, then, if I understand it, SqlServer must also be installed on the host machine?

A server must be available on the network -or- in your situation, locally on each PC.

>>If I use an access database for tables only, it was my impression that the host machine would have to have Access installed or have a runtime version of Access has to be installed. 

If you are only using that database part (no forms nor reports), you don't need to install Access.
If you are only using that database part (no forms nor reports), you don't need to install Access. .
OK ... but you still need the Runtime which does not allow more different versions on one machine.
 
Or did Microsoft remove this restriction already?

not if you are only using the database part, the ADO.Net drivers can connect without having Access installed
Does Microsoft offer such driver download or do you mean the paid solution from the 3rd party, like e.g. this one which is $800/year?

Tx
ADO.Net drivers are already built-in the .Net framework. Nothing else to install/pay.
Avatar of Sonny G

ASKER

Eric, Can I use the tables AND queries in the Access Database as data for the VB .NET application? How do I make sure that the VS2022 code is accessing the tables as ADO.NET?
Yes queries can be used, they are considered something like Stored Proc or views from other engines.

If you are creating an OleDbConnection, you are using ADO.Net. Have a look at https://www.c-sharpcorner.com/uploadfile/mimrantaj/connect-to-access-database-in-C-Sharp-and-ado-net/
Avatar of Sonny G

ASKER

Eric,

You are an absolutely-great godsend! Thank you for your help!

I have a separate .NET question  posted on this site about locating the ribbon in Visual Studio 2022. I think that I have to add a reference but am unsure which one. Maybe there, I can give you 100% credit/points.

Thanks, again. I appreciate you and your kindness.