Hey,
To execute a select statement, you would do:
mySQLDataAdapter = new SQLDataAdapter("proc, query, or table name", myConnection)
mySQLDataAdapter.SelectCommand.CommandType = CommandType.<appropriate type>
mySQLDataAdapter.Fill(myDataSet, "tableName")
To execute:
mySQLDataAdapter = new SQLDataAdapter()
mySQLDataAdapter.InsertCommand = new SQLCommand("proc, table, or query", myConnection)
mySQLDataAdapter.InsertCommand.CommandTYpe = <appropriate type>
myConnection.Open()
mySQLDataAdapter.InsertCommand.ExecuteNonQuery()
myConnection.Close()
Brian
|