I've done a few hours of research but nothing seems to apply to my current situation.
Using: Visual Studio 2010 .net 4.0, Language: C#
Issue:
I created a form and then drag and dropped the Specific Table from my Datasources onto the form to have VS2010 create the data table for me.
When I attempted to change or add values to the database using the data table, I get the error listed above
"ExecuteReader: CommandText property has not been initialized".
As from my previous research, NO, I have not defined a CommandText nor do I know where to create one considering VS2010 created all the datatable code and does not list it in the .cs file itself.
Code obtained from form by hitting f7
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace mineral_monitor.Manual_edits
{
public partial class mineral_stock : Form
{
public mineral_stock()
{
InitializeComponent();
}
private void mineralsBindingNavigatorSaveItem_Click(object sender, EventArgs e)
{
this.Validate();
this.mineralsBindingSource.EndEdit();
this.tableAdapterManager.UpdateAll(this.ore_stockDataSet1);
}
private void mineral_stock_Load(object sender, EventArgs e)
{
// TODO: This line of code loads data into the 'ore_stockDataSet1.minerals' table.
// You can move, or remove it, as needed.
this.mineralsTableAdapter.Fill(this.ore_stockDataSet1.minerals);
}
}
}
This was resolved by creating an update string manually in the data designer.