|
|
@ -168,9 +168,16 @@ namespace PSqLiteWrapper |
|
|
|
return dataSet; |
|
|
|
return dataSet; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static SQLiteDataAdapter GetAdapterSelectQuery(SQLiteConnection openedConn, string query) |
|
|
|
public static SQLiteDataAdapter GetAdapterSelectQuery(SQLiteConnection openedConn, string query, bool withCommandBuilder = true) |
|
|
|
{ |
|
|
|
{ |
|
|
|
SQLiteDataAdapter adapter = new SQLiteDataAdapter(query, openedConn); |
|
|
|
SQLiteDataAdapter adapter = new SQLiteDataAdapter(query, openedConn); |
|
|
|
|
|
|
|
if (withCommandBuilder) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
SQLiteCommandBuilder builder = new SQLiteCommandBuilder(adapter); |
|
|
|
|
|
|
|
adapter.UpdateCommand = builder.GetUpdateCommand(); |
|
|
|
|
|
|
|
adapter.DeleteCommand = builder.GetDeleteCommand(); |
|
|
|
|
|
|
|
adapter.InsertCommand = builder.GetInsertCommand(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return adapter; |
|
|
|
return adapter; |
|
|
|
} |
|
|
|
} |
|
|
|