Click here to Skip to main content
15,905,781 members
Please Sign up or sign in to vote.
2.50/5 (2 votes)
See more:
Hi Friends,

I am stuck in a problem and I need a little help. I am creating an application wherein I need to connect to a Database (MSSQL or Access or MySQL). Kindly suggest me to create a front end from where a user (client) can setup this information like: which server?, username?, password? and connection engine? etc.
Also, if I am not wrong, there is a difference between the SQL queries for Access, MSSQL and MySql so I need to create multiple classes to manage those also. Kindly guide me a little.
Thank you very much.

Tushar Srivastava
Posted
Comments
DamithSL 9-Jun-14 10:47am    
Are you using all these databases?
Er. Tushar Srivastava 9-Jun-14 10:50am    
Actually I am making a software (like Data Entry etc) where a client can use my software as an interface to do CRUD on database. He/She might have any of the following Database Server: MS-SQL, MS Access or MySQL Server. So, I might need to provide my users with an option to select his own database server and other credentials as I have mentioned.
ZurdoDev 9-Jun-14 10:48am    
You can look at connectionstrings.com to see what different connection strings will need. And yes, the syntax does differ for each product. This sounds like a massive undertaking for you.
Er. Tushar Srivastava 9-Jun-14 10:51am    
Yes It is... I have been stuck for around 1 night and Finally I thought of asking for help.
[no name] 9-Jun-14 11:06am    
There is really nothing here to "help" with. You need to do some research and figure out what each of those databases need for their connection strings and design your UI to accommodate those items. And yes you will have to come up with some system to deal with the differences in your queries.

1 solution

Its very easy, you will have to use entity framework, which translates sql queries according to the database server automatically. You will have to
1: Copy DAL classes and paste them in DAL, just do some miner changes like
(i) write OracleConnection insteated of SqlConnection, and OleDbConnection.
its a Complete Tutorial which can solve your problem

http://www.youtube.com/watch?v=aoFDyt8oG0k

http://www.youtube.com/playlist?list=PL6n9fhu94yhX5dzHunAI2t4kE0kOuv4D7
http://csharp-video-tutorials.blogspot.com/2012/10/what-is-adonet-part-1.html
 
Share this answer
 
v3
Comments
Er. Tushar Srivastava 12-Jun-14 14:23pm    
Ok :) I haven't yet watched these videos but based on their title, I guess they are not directly related to Entity Framework, are they?
BTW, I guess your answer might help me solve the problem. Thank you very much :) :) :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900