wxWidgets itself has no database component in wx 3.x, do you mean wxDatabaseLayer? Its last supported wxWidgets version is 2.6, so it might require some "fiddling" to make it work under wx 3.x.
Right now there is no wxWidgets database library that i could recommend. I think you should look into generic, non-wxWidgets libraries which should work well enough with wxWidgets.
Sorry, i don't use CodeBlocks and i've never used any of the libraries i mentioned. But this is neither CodeBlocks or wxWidgets specific, try looking for usage instructions of the respective library.