You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created a simple form with a button, when clicked will run a function called populate(). using the chunk of code below causes an error as in the title of this post.
private void Populate()
{
var countStatementBuilder = new CountStatementBuilder();
countStatementBuilder.CommandText("SELECT COUNT(*) FROM dbMyBirds");
var rowsStatementBuilder = new RowsStatementBuilder();
rowsStatementBuilder.CommandText("SELECT * FROM dbMyBirds LIMIT {1} OFFSET {2}");
dataGridViewPaging1.DbRequestHandler = new DbRequestHandler
{
Connection = new SQLiteConnection("Data Source=dbMyBirds.sqlite3"),
CountStatementBuilder = countStatementBuilder,
RowsStatementBuilder = rowsStatementBuilder
};
}
The first time I click the button it will populate the datagridview, the 2nd time I get an Exception Unhandled
System.ObjectDisposedException: 'Cannot access a disposed object.
Object name: 'SQLiteConnection'.'
The only changes I made was pointing it to my db file and db name.
Edit:
I was hoping to be able to implement some search features such as searching by various columns, keywords, return limited search results... thanks
The text was updated successfully, but these errors were encountered:
I created a simple form with a button, when clicked will run a function called populate(). using the chunk of code below causes an error as in the title of this post.
The first time I click the button it will populate the datagridview, the 2nd time I get an Exception Unhandled
System.ObjectDisposedException: 'Cannot access a disposed object.
Object name: 'SQLiteConnection'.'
The only changes I made was pointing it to my db file and db name.
Edit:
I was hoping to be able to implement some search features such as searching by various columns, keywords, return limited search results... thanks
The text was updated successfully, but these errors were encountered: