Interfacing C++ with SAP ERP - c++

Is it possible in C++ Visual studio that I can connect to SAP Database, write data to it ?
For example, I'm doing a facial recognition project and it's already done, but the remaining part is to connect SAP and write the Face ID of the user to the HR database plus the time stamp.

Ahmed, first you need to determine what the database your SAP system is running on, doesn't sound like you know so get that information first so you can get the right driver. Then the answer to your question is, yes. Create a connection using your driver first to connect to the server and database you are trying to update, you'll need to get the server name, database name and database credentials for your DBA, then in Visual Studio go to View > Server Explorer to add access to your new connection and then write your SQL to update insert you records.
The second part, yes if you write to the database tables properly it will show up in SAP.

Related

How can I make a SQL application work offline?

I'm making a c++/Qt application. It connects to a small online database to find different information. I need to make sure that the application works offline. So I would like to do the following
On start up of application:
- Check if internet connection is available
- if available connect to online database, download database to local (for next time no internet is available)
- if not available connect to the kocally stored version of the database
My problem is I can't find a simple solution how to "download" the database. The user will not update the database, so there is no need for syncing when online again, just the ability to download the newest version of the database, whenever online. It is a MS SQL server that the application uses.
My only idea for a solution is to have an SQLite db in the application, and then write a script that clears the SQLite database and then puts everything from the online server into it, but this requires that I write a script that goes through all of the databse. There must be a better solution. I'm also not sure how this solution should work if the database structure changes. A solution for this could just be to send out a update for the application if the structure changes with a new SQLite db with the new structure.
I tried searching for a solution, but I could not find anything that are simple. Since I don't neew syncing back and forth, I thought there must be a simple solution. Any help pointing me in the right direction is appreciated.

How to use SQLite database from one platform(iOS) to another(Windows)

I don't know its a valid question or not.
I am working on one MFC/C++ application where
I want to use SQLite database from iOS application in my windows application.
My iOS database is encrypted using command sqlite_key.
While I am trying it for my windows application for the same database
It throws an exception for any operation on the database.
While Searching on Google I am not able to get right track for this.
Can anyone tell me is it possible?
And if yes please help me on this.
If your plan is to "export" it, i.e you want to reuse the data inserted by your ios application into your windows one, then you simply need to locate on your iphone the sqlite database file (sqlite store everything in one single location) and copy it on your computer, and tell your windows software the location of this file.
If your is to "share" the database, i.e both should be able to modify it in "realtime", then you will have to roll something on your own, as Sqlite3 does not provide any network support, it's just a library to read and write data in a file, in a SQL way.

Online / Offline managing Mysql database

I'm creating a software in c++ with Qt library where the database is loaded when you log in to the software.
When it's done you can use it without connection and edit your database, then when you have internet access you can update your online database.
How can I do that ?
Write it into a file with my own format and then parse and do the mysql request when I have internet connection ?
Use a database with localhost and then copy it to the real one ?
An other solution ?
When two users update their database offline, how can I check they don't use the sameId ? By the way I need the ID as father/son elements.
Thanks.
I found a good solution which is to use a sqlite database in my C++ program.
So I have the same requests in both directions ("Upload", "Download") and access to all my data in the whole program (use of singleton for database access)

How to profile embed firebird database

Did I make wrong to use firebird database I don't know. It has lot's of good futures but I can't figure out why my query (stored procedure) didn't work.
Is there any profiler/monitoring tool for firebird?
Firebird database is working stand alone so it is embeded db. And It doesn't allow to connect with 2 users. If there is a profiler I wonder how it will connect while I'm executing my queries.
IBExpert and Database Worbench have stored procedure debugger
There is also many monitoring tools http://www.firebirdfaq.org/faq95/
I advice you to install server version if you want to have more than 2 users

Using MS Access to return on-demand reports in a web server?

I have built a MS Access 2007 application that can create reports files in various formats (PDF, XLS, CSV, XML).
I would like to allow the creation of these reports to be accessible from a web page where users would just click on a link and get a download of the report produced by my Access application.
I would like to keep it simple and I'm not interested at this stage in rewriting the data processing in .Net. I'd just like to find a way to automate the creation of the user report to return a file that can be downloaded.
In essence, my Access application would act as a web service of some kind.
The web server is IIS on Windows 2003.
Any pointers or ideas would be welcome. I'm not well versed in IIS administration or ASP pages.
The first quick and dirty method i could think of would be to call Access from a shell and pass it a few parameters to open as read only and run a macro.
That macro would have to pull it's report parameters from somewhere (possibly env variables), run the report and save it as Excel, PDF or whatever to a unique name. To du this you'll need to pass the report name, a unique request id, and a param array to handle multiple (or none) parameters.
Last but not least your Access macro / VBA Sub will need to shut access down.
This isnt a good solution as starting one copy of Access per request isn't really advisable though.
Another option is to have start Access on the server with a VBA sub that starts on opening. This sub could poll a directory for requests that are written by your web server. Then on receiving a request run a report and write it to somewhere. Again you'd have to base this around a unique request ID.
I'm not really sure which "solution" would be better.... Access as a command line report generator or Access as a batch reporting service. Both would be nasty, but would get you over the hump until you can migrate to a reporting service.
This is kind of a round about way to achieve what you're asking. You can utilize the free version of sql server express 2005 or 2008 advance edition which includes the reporting services component. Using the report generation tools you can convert your access 2007 reports to sql server reports and have those reports feed off of the access database. You can also go to the extent of migrating the database to sql server as well if you wanted to go that route. Reporting services will generate pdf, xls, csv and xml formats as output for your reports and you can generate those reports just by passing the parameters in the url to the server which will return your report in the format requested.
Link to sql server 2008 express advanced edition:
http://www.microsoft.com/express/sql/download/
If you do not wish to rewrite in .Net, how about Classic ASP and VBScript? VBScript has a lot in common with VBA, so it should not take long create something usable, and there is a great deal of help available for ASP and VBScript on the internet. For example, a simple search returned this method of creating a PDF with Adobe from ASP:
Creating a PDF with ASP