C++ Windows Form Application Mysql Connection - c++

I can't seem to figure out how to connect to mysql in my windows form application. I've installed all the proper libraries and have included them, thats not the issue. The issue is I can't find a tutorial on connecting to mysql. I've found some one console applications, tried them, but yet for some reason they do not work. I just need to be sent into the right direction, thanks.

I don't know what library you're using, but I recommend MySQL++. It's simple, has a great manual and lot of examples.

Related

Starting my first Django project on Ubuntu VPS

I have been thinking long and hard about making this post and after hours of Google searches I couldn't come up with any good sources so thought I'd ask here.
I am relatively new to coding, started early this year and started a software programming degree so I am super keen to learn. I have managed to make a fully working project that works on shared hosting but doesn't allow me to use latest packages and modules that is why I upgraded to a VPS. But editing my project on cPanel on a shared hosting was alot less scary than what I'm attempting now.
I've recently purchased a VPS to host my first django project I'm building for my father, the project is basically a gallery that allows him to upload a blog and images. I had a standard shared hosting plan which was fine but I couldn't use latest python and django on it.
So what I want to ask is; what is the common practice for starting off with building a project on ubuntu? In my head it was building it on VSCode and just transferring it to ubuntu, linking it to my domain and BAM.
I've found writing the code very tedious and difficult on ubuntu terminal, using cd to go in and out of folders, copy and paste not working etc. so Is writing it on local pc using VSCode acceptable?
How would static files be stored for my father when he uploads his images/blogs, do they store on the VPS or do I need to link something like AWS which is what I really wanted to avoid when getting a VPS.
I would even appreciate just a step by step list of a common procedure for a project as I have described above.
I appreciate anybody and everybody who is willing to give up some time to help me here.
Many Thanks.
Try this guide here. It is a beginner friendly approach to setup django:
https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-22-04

Geolocation, Geocoding in C++

I am working on a project or application built in Windows using C++. I would like to seek help on any idea or approach or existing libraries that implements geolocation/geocoding, since I want to limit may C++ Windows application to run on certain region or country only.
Any suggestions, comments will be a great help. Thanks.
It won't be possible to prevent an application from running locally in certain regions. A user can always disconnect from the internet and then you'll have no idea where they're located.
What you could do is to have some of your app logic run in a server, then make requests to your server from the local C++ app. Then you can geolocate based on the IP address of the request, often a standard feature in cloud platforms.
If you do want to explore getting someone's location, you can look at Apple's Core Location or Microsoft's Geolocation namespace.

Installing Railo on Media Temple

I have a reseller account with Media temple. It doesn't support Railo ( http://www.getrailo.com/ ) out of the box but I really do want to use their service, but with some sites using Railo of course.
First port of call was Media temple to assist me...but they don't offer support with resellers on the DV with regards to installing software.
I also Googled and the only thing I can find is this (which looked perfect):
http://jakemauer.com/weblog/railo-on-mediatemple-dv-server/
However, it's out-dated somewhat and I simply do not posses enough technical skill to achieve it (I'm mainly a designer / front-end dev, offering reseller to my clients). One of the first things that guide requires is to get YUM going, but even that I was stuck on. The terminal threw up errors about other files it needed as 'dependencies' and I have no idea how to get that going. I found the process quite complicated. I'm not a server admin :(
I'd be happy to pay someone to do this, but would rather figure it out myself as I'm eager to learn too.
If anyone has experience doing this and can offer insight I'd appreciate it so much.
Thanks,
Michael.
The Railo installer should work just fine on a Media Temple VPS. Documentation on how to launch the Railo installer on a linux machine can be found here:
http://wiki.getrailo.com/wiki/Installation:InstallerDocumentation:LinLaunching
If you don't have a GUI on your server, don't worry, just SSH to your server and run the commands that are posted in the "Command-Line Install" sections.
If you have any problems with any aspect of the install process as outlined in the documentation, I'd recommend the Railo mailing list. The community there (like this one) is quite friendly and can walk you through almost any problems you encounter.

C++ Database Connection

I need to connect to a database with c++, I have tried to use mySql++, mySql connector, and a few others however I am unable to get them running, I've tried the tutorials but I can't seem to get them right. VS doesn't see the files that I try to include.
Anyways, Is there a somewhat easy way to connect to a database using c++ without needing to download a ton of files or api's. and if so could you please provide a link to a tutorial, ive tried using ODBC, however I don't think ive been doing it right as it shows a ton of errors in my code.
any help would be appreciated,
Thanks
How about OTL. It is just a header file so far away from tons of files. And all you need is the libraries depending on the DB you want to connect to.
ODBC is a little bare metal - surely there are some more accessable ADO classes (you might need MDAC)?
First, you have to know what kind of database you have to connect to. It does matter, as you won't use the same API to connect to a MySQL database, or to a SQLite one, or Oracle, or Postgres, or SQL Server ...
Then, have a look at the library that allows acces to the database. And make sure that the database is actually present!
C++ Standard doesn't has native database support. You cannot connect to a database using C++ without database/platform specific libraries. Such as this or this one, if you want to connect to MySQL server.

Is there any way to connect to oracle db using simple c++ not vc++ or proc

I am struggling to connect to oracle db using GNU C++.Is there any library which I have to install to connect to oracle db using simple c++ (oops).
Please provide me some sample code as well, this is new for me. Appreciate your help.
I asked a similar question before but forgot to mention that I am not using vc++ and proc.
You would need the oracle C++ libraries (OCCI) from oracle. You can find them here:
http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html
Google "Oracle OCCI tutorial" and you should find pretty much everything you need.
Check out SOCI. It supports several database backends, including Oracle, MySQL, Postgre, ODBC, etc. Using this library would make it easier for you to migrate your application to a different DB, if necessary.
There's a code sample here. And several more peppered in the documentation.