asp.net.ph

SqlDataAdapter Constructor ( )

System.Data.SqlClient Namespace   SqlDataAdapter Class


Initializes a new instance of the SqlDataAdapter class.

[ VB ]
Overloads Public Sub New ( )

[ C# ]
public SqlDataAdapter ( );

[ C++ ]
public: SqlDataAdapter ( );

[ JScript ]
public function SqlDataAdapter ( );

Remarks

When an instance of SqlDataAdapter is created, the following read/write properties are set to initial values.

Properties Initial Value
MissingMappingAction MissingMappingAction.Passthrough
MissingSchemaAction MissingSchemaAction.Add

You can change the value of any of these properties through a separate call to the property.

Example

The following example initializes an SqlDataAdapter using this constructor, then sets some of its properties.

// set up the connection
SqlConnection myConn = new SqlConnection (
   "server=localhost; trusted_connection=yes; database=pubs" );

// set up the dataadapter
SqlDataAdapter myAdapter = new SqlDataAdapter ( );
myAdapter.SelectCommand.CommandText = "SELECT * FROM authors";
myAdapter.SelectCommand.Connection = myConn;
  C# VB

See Also

SqlDataAdapter Members   SqlDataAdapter Constructor Overload List   MissingMappingAction   MissingSchemaAction Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph