The article is good and it help but the matter is that I need use it with vb.2005 not vb.net 2003
The idea that I need confirm specailly when I create a bindingsource the system will ask to create connection then I will select (OLE, ODBC, ORACLE, SQL)
The VB.net 2005 will create data adapter that connect to that type of connection and also show the table from the desire database belong to that connection withing the wizzard that help you to create full till you reach the final dataset.
I am planing to change the source of connection using parameters
if connectypes="Oracle" then
Me.Users_settingsTableAdap
elseif connectypes="SQL" then
Me.Users_settingsTableAdap
elseif connectypes="Access" then
Me.Users_settingsTableAdap
Are this correct?
if it's correct ? do I need to make any extra changes in database or in the connection settings.
thanks
Main Topics
Browse All Topics





by: Priest04Posted on 2009-09-24 at 23:33:52ID: 25420428
BindingSource is not database dependant (like DataTable and DataSet arent). But in order to use different datasource, you would need differemt connection objects, different tableAdapters, Command objects, DataReaders, etc. You can easily distinguish which is DBMS dependant by looking at the namespace they belong to. For example, everything that is in System.Data can be used with any DBMS. Everything that is in System.Data.SqlClient can be used with SQL Server only.
837 _Implement ing_a_Data _Access_La yer_in_C.
You can work with interfaces if you want to be DBMS independent. For example, you could use IDataReader instead of SqlDataReader, IDbTransaction instead of SqlTranscation, etc. IDataReader is inherited by both SQL Server and Oracle Data Readers. And the same thing for every class thay is DBMS dependant
here is one example how you can create DBMS independent data access layer
http://aspalliance.com/
Goran