[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Ensuring access to multiple database platforms.

Posted on 2004-08-20
7
Medium Priority
?
186 Views
Last Modified: 2010-04-23
I am developing my first asp.net/vb.net application. During my previous classic asp projects, I always had problems when I need to switch from MS Access to MS SQL or heaven forbid, to postgre or mysql...

How can I ensure, during development, that I (at least) stay compatible with both MS Access and MS SQL? It would be nice to support the others too, but both MS platforms will be critical.
0
Comment
Question by:smetterd
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 28

Expert Comment

by:iboutchkine
ID: 11854433
Add Imports for every database you can use
for Access
Imports System.Data.OleDb
 for SQL Server
Imports System.Data.SqlClient

etc

Define different connection string for different database. The rest is the same
0
 
LVL 2

Author Comment

by:smetterd
ID: 11859218
I am confused... I thought there was a lot more to it than that... for instance, different tweaks in syntax for queries?
0
 
LVL 28

Expert Comment

by:iboutchkine
ID: 11881201
DIfferences:
1.Imports
2.Connection string
3.SQL (depending on the database)
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Author Comment

by:smetterd
ID: 11888255
Thanks y'all, but I was looking for a full scale, easily-understood plan for making my app compliant with at least both access and mssql. So far, we've just (among ourselves) agree that, yes, there are some differences.
0
 
LVL 2

Author Comment

by:smetterd
ID: 11888259
iboutchkine, are you saying just to keep developing, but while doing so make sure that I import both namespace differences, and every time I write some SQL to test it on both DB's to ensure it works?
0
 
LVL 28

Accepted Solution

by:
iboutchkine earned 1500 total points
ID: 11891858
You can have Select case

Select Case DB
  Case "Access"
     ConnectionString=...
     SQL = ...
  Case "SQLServer"
     ConnectionString=...
     SQL = ...
End Select

etc
0
 
LVL 2

Author Comment

by:smetterd
ID: 11898518
Good, that's what I've started doing.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question