Click here to Skip to main content
14,690,249 members
Home » Discussions » .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: Problems with EntityFramwork - compatible Framework Database Driver not found?! Pin
Gerry Schmitz15-Feb-20 10:52
mveGerry Schmitz15-Feb-20 10:52 
QuestionClosing and Disposing Excel Application Process in C# Pin
Pramod_Kumar14-Feb-20 5:26
MemberPramod_Kumar14-Feb-20 5:26 
AnswerRe: Closing and Disposing Excel Application Process in C# Pin
Richard Deeming4-Feb-20 5:37
mveRichard Deeming4-Feb-20 5:37 
Questionconverting text file data from string to X,Y,Z coordinates Pin
Sher Shah 11-Feb-20 4:32
MemberSher Shah 11-Feb-20 4:32 
AnswerRe: converting text file data from string to X,Y,Z coordinates Pin
Pete O'Hanlon1-Feb-20 5:10
subeditorPete O'Hanlon1-Feb-20 5:10 
GeneralRe: converting text file data from string to X,Y,Z coordinates Pin
Sher Shah 11-Feb-20 6:11
MemberSher Shah 11-Feb-20 6:11 
GeneralRe: converting text file data from string to X,Y,Z coordinates Pin
phil.o1-Feb-20 7:28
mvephil.o1-Feb-20 7:28 
QuestionApplication wide information into classes in referenced DLL's Pin
A D Rosser28-Jan-20 5:22
MemberA D Rosser28-Jan-20 5:22 
I am not sure the subject gives a clear indication of my problem/question.

I am building a set of applications based on a common database. In order to facilitate this I have a VB.NET project that handles all of the database connectivity and manages the tables.

One class in this project "Functionality" has methods for the actual database calls. The connection string is fixed in it.

The other classes in this project are for each table in the database for save, loadrecord, etc. Each of these classes instantiates the Functionality class to select/insert/update.

This project is compiled into a dll.

Other projects which include a stand-alone programme to deal with repetitive tasks and a desktop application, reference the DLL and instantiate the tables classes as required to obtain data, and change it.

Move forward and I now need the entire system to work with a second database. However the database is identical in structure. So the only change is the connectionstring. Obviously I can change this in the Functionality class, recompile the DLL. And recompile the applications and I have a version working with the new database. However, what I want is to be able to switch between the databases on the fly. And this is my problem.

I need someway for the Functionality class to be able know which Database (M or T or A or S) is required by the application that instantiated a table class that is using the Functionality class.

So, the Desktop application can have a Public Shared variable, but this can not be seen by the called method of the table class.

If you understand this, is there anyway of doing what I want?
AnswerRe: Application wide information into classes in referenced DLL's Pin
Richard Deeming28-Jan-20 5:32
mveRichard Deeming28-Jan-20 5:32 
GeneralRe: Application wide information into classes in referenced DLL's Pin
A D Rosser29-Jan-20 6:04
MemberA D Rosser29-Jan-20 6:04 
AnswerRe: Application wide information into classes in referenced DLL's Pin
Gerry Schmitz28-Jan-20 5:40
mveGerry Schmitz28-Jan-20 5:40 
GeneralRe: Application wide information into classes in referenced DLL's Pin
A D Rosser29-Jan-20 6:13
MemberA D Rosser29-Jan-20 6:13 
GeneralRe: Application wide information into classes in referenced DLL's Pin
Eddy Vluggen29-Jan-20 7:48
professionalEddy Vluggen29-Jan-20 7:48 
GeneralRe: Application wide information into classes in referenced DLL's Pin
watchmeoni9-Mar-20 15:18
Memberwatchmeoni9-Mar-20 15:18 
AnswerRe: Application wide information into classes in referenced DLL's Pin
Mycroft Holmes28-Jan-20 11:13
professionalMycroft Holmes28-Jan-20 11:13 
GeneralRe: Application wide information into classes in referenced DLL's Pin
A D Rosser29-Jan-20 6:17
MemberA D Rosser29-Jan-20 6:17 
GeneralRe: Application wide information into classes in referenced DLL's Pin
Mycroft Holmes29-Jan-20 11:31
professionalMycroft Holmes29-Jan-20 11:31 
QuestionHow to export multiple image to excel in .Net core Pin
Member 1422622525-Jan-20 5:52
MemberMember 1422622525-Jan-20 5:52 
QuestionSubtract number for each row from datagridview1 to datagridview2 and display to answer to datagridview3 Pin
percy0521-Jan-20 16:32
Memberpercy0521-Jan-20 16:32 
AnswerRe: Subtract number for each row from datagridview1 to datagridview2 and display to answer to datagridview3 Pin
Richard MacCutchan21-Jan-20 22:32
mveRichard MacCutchan21-Jan-20 22:32 
QuestionGetting Error System.IO.InvalidDataException: 'End of Central Directory record could not be found Pin
simpledeveloper2-Jan-20 9:10
Membersimpledeveloper2-Jan-20 9:10 
AnswerRe: Getting Error System.IO.InvalidDataException: 'End of Central Directory record could not be found Pin
Eddy Vluggen2-Jan-20 11:29
professionalEddy Vluggen2-Jan-20 11:29 
AnswerRe: Getting Error System.IO.InvalidDataException: 'End of Central Directory record could not be found Pin
Richard MacCutchan2-Jan-20 22:55
mveRichard MacCutchan2-Jan-20 22:55 
Questionwhat is tuple in mvc Pin
Anil Sharma198326-Dec-19 6:29
professionalAnil Sharma198326-Dec-19 6:29 
AnswerRe: what is tuple in mvc Pin
Pete O'Hanlon26-Dec-19 7:38
subeditorPete O'Hanlon26-Dec-19 7:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.