I want to create a C ++ program in Visual Studio that would work with an Oracle database. There is an already created DDL script. How to create a database in VS and fill it with data? (Preferably detailed instructions)
- four1. You need to install an Oracle Database Server; 1.1. Execute the script and create the necessary database; 2. Install connectors for DB; 3. Configure the connection to the necessary database in the project - Bald
- @Bald Please, if you own the theme, transform your comment into the answer. - Cerbo
- @Cerbo, well, my comment can hardly be considered a complete answer, it is rather a hint. In general, it is not entirely clear what exactly the author fails. create a database, connect to it (in the sense of a database), or how to get test data and write it in a database - Bald
- @Bald The question is not about what “does not work”, but about how to create and score a base. The question is very useful to the article. - Cerbo
1 answer
VisualStudio and Oracle are very poorly integrated at the moment. But if you really want to work directly with Oracle from OracleStudio, you will need to download a driver plugin that supports the version of your VS (on the offsite Oracle website for free).
But my advice to you is not to suffer in this way. Work with Oracle databases through more user-friendly programs such as PL / SQL Developer and similar. And only then write the code written in the database and use it in VisualStudio (you will need an Oracle driver for VS).
I don’t remember what the driver is from this and what the plugin is for the integration of the studio and VS (but I think you’ll figure it out yourself)
- ODTwithODAC (integration)
- Oracle Data Tools for VS (driver for connecting to the database from VS projects)
To connect to VS, it will be necessary to connect the DLL "Oracle.ManagedDataAccess.dll" in the project, which will appear on your PC after installing the driver in the folder where you install it. You add a link to it in the project and in sections USING (C #) and there is already Google to help - it is used very easily and clearly. In outline:
- OracleClient
- OracleCommand
- OracleDataAdapter