This blog is a knowledge base...where I clip cool tricks and urls

IDataProvider - Implement Provider Model C#

In the CreateDataAdapter method you will have to do a couple of things to create an instance of a specific data adapter. First you will need to initialize the appropriate provider based on the information in the configuration file. The InitProvider method is responsible for this and will be shown in the next section. After the appropriate DataProvider class is loaded the CreateDataAdapter method on that specific provider will be called. This is where the SqlDataAdapter or the OleDbDataAdapter or the OracleDataAdapter is created.
public static IDbDataAdapter CreateDataAdapter(
 string SQL, string ConnectString)
  IDbDataAdapter da;

  // Make sure provider is created

  da = DataProvider.CreateDataAdapter();

  da.SelectCommand = CreateCommand(SQL, 
   ConnectString, false);

  return da;

In Visual Basic

 blog it

1 comment:

pay per head service said...

This is an interesting..... great information found here... Thanks very much!