Click here to Skip to main content
15,886,873 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 9:52
mveGerry Schmitz15-Feb-20 9:52 
QuestionClosing and Disposing Excel Application Process in C# Pin
Pramod_Kumar14-Feb-20 4:26
Pramod_Kumar14-Feb-20 4:26 
AnswerRe: Closing and Disposing Excel Application Process in C# Pin
Richard Deeming4-Feb-20 4:37
mveRichard Deeming4-Feb-20 4:37 
Questionconverting text file data from string to X,Y,Z coordinates Pin
Sher Shah 11-Feb-20 3:32
Sher Shah 11-Feb-20 3:32 
AnswerRe: converting text file data from string to X,Y,Z coordinates Pin
Pete O'Hanlon1-Feb-20 4:10
mvePete O'Hanlon1-Feb-20 4:10 
GeneralRe: converting text file data from string to X,Y,Z coordinates Pin
Sher Shah 11-Feb-20 5:11
Sher Shah 11-Feb-20 5:11 
GeneralRe: converting text file data from string to X,Y,Z coordinates Pin
phil.o1-Feb-20 6:28
professionalphil.o1-Feb-20 6:28 
QuestionApplication wide information into classes in referenced DLL's Pin
A D Rosser28-Jan-20 4:22
A D Rosser28-Jan-20 4: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 4:32
mveRichard Deeming28-Jan-20 4:32 
GeneralRe: Application wide information into classes in referenced DLL's Pin
A D Rosser29-Jan-20 5:04
A D Rosser29-Jan-20 5:04 
AnswerRe: Application wide information into classes in referenced DLL's Pin
Gerry Schmitz28-Jan-20 4:40
mveGerry Schmitz28-Jan-20 4:40 
GeneralRe: Application wide information into classes in referenced DLL's Pin
A D Rosser29-Jan-20 5:13
A D Rosser29-Jan-20 5:13 
GeneralRe: Application wide information into classes in referenced DLL's Pin
Eddy Vluggen29-Jan-20 6:48
professionalEddy Vluggen29-Jan-20 6:48 
GeneralRe: Application wide information into classes in referenced DLL's Pin
watchmeoni9-Mar-20 14:18
watchmeoni9-Mar-20 14:18 
AnswerRe: Application wide information into classes in referenced DLL's Pin
Mycroft Holmes28-Jan-20 10:13
professionalMycroft Holmes28-Jan-20 10:13 
GeneralRe: Application wide information into classes in referenced DLL's Pin
A D Rosser29-Jan-20 5:17
A D Rosser29-Jan-20 5:17 
GeneralRe: Application wide information into classes in referenced DLL's Pin
Mycroft Holmes29-Jan-20 10:31
professionalMycroft Holmes29-Jan-20 10:31 
QuestionHow to export multiple image to excel in .Net core Pin
Member 1422622525-Jan-20 4:52
Member 1422622525-Jan-20 4:52 
QuestionSubtract number for each row from datagridview1 to datagridview2 and display to answer to datagridview3 Pin
percy0521-Jan-20 15:32
percy0521-Jan-20 15:32 
AnswerRe: Subtract number for each row from datagridview1 to datagridview2 and display to answer to datagridview3 Pin
Richard MacCutchan21-Jan-20 21:32
mveRichard MacCutchan21-Jan-20 21:32 
QuestionGetting Error System.IO.InvalidDataException: 'End of Central Directory record could not be found Pin
simpledeveloper2-Jan-20 8:10
simpledeveloper2-Jan-20 8:10 
AnswerRe: Getting Error System.IO.InvalidDataException: 'End of Central Directory record could not be found Pin
Eddy Vluggen2-Jan-20 10:29
professionalEddy Vluggen2-Jan-20 10:29 
AnswerRe: Getting Error System.IO.InvalidDataException: 'End of Central Directory record could not be found Pin
Richard MacCutchan2-Jan-20 21:55
mveRichard MacCutchan2-Jan-20 21:55 
Questionwhat is tuple in mvc Pin
Anil Sharma198326-Dec-19 5:29
professionalAnil Sharma198326-Dec-19 5:29 
AnswerRe: what is tuple in mvc Pin
Pete O'Hanlon26-Dec-19 6:38
mvePete O'Hanlon26-Dec-19 6: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.