Add, save data from MFC App(Visual Studio 2015) to SQL Server - c++

I am beginner in using Visual Studio. I've had learnt on displaying data from SQL Server in ASP.NET web application. Now I want to display data with MFC Application(Project type). I don't know how to start make the button functioning which is to save any text to database. Compared to ASP.NET, it offers toolbox Grid View that easily display data but not in MFC App. Currently I just have a .rc file that being designed its interface. I got SQL Server Management Studio to use. I take a look at https://www.tutorialspoint.com/mfc/mfc_database_classes.htm but the guidance not complete. I need a step by step and complete tutorial on how to add, save data into SQL Server using MFC Application at Visual Studio 2015.

Create a class in your MFC Application of type ODBC Customer. Right click on your "Header Files" folder in the Solution Explorer and click "Add Class". Select the option "MFC" and select "MFC ODBC Customer". Then you are asked to select your data source. Assuming that you haven't created any data source till now, click "New". Select your database driver type and then type the location where you want to save your data source. After saving, you will be asked the names of the server you wish to connect to and a description of your data source. After clicking "Next", you are asked about the authentication. I prefer "SQL Server Authentication using login id". Provide username and password. After "Next", you can select your database from the server or attach a database to the server. Click "Next" and you are moved to some optional selections. It is fine to let them be and click "Finish". You will now have a class which is used to add,read or delete data in the database.

Related

Oracle Apex workspace settings for multiple sessions for the same user account

Making Faster Navigation Between APEX Site-Designer Pages
I am having a few difficulties here as this may be a setting that I took for granted in other previous versions of Oracle APEX as before it may have been a default setting, but now the default has changed. Can anyone help me figure it out? I also explain why it was useful for me before...
How do you enable the Oracle APEX instance to permit logging in to the site-designer pages for a single workspace (Application Builder, SQL Workshop, Team Development modules, etc.) using the same user id through more than one browser window?
Note, I do this to save time from navigating between each section of the site-designer (even quick load times can slow down developing an application page or region because of constant shuttling back and forth to make small changes originally missing).
Example Use Case:
Oracle APEX Release: Application Express 4.2.6.00.03
Database Platform: Oracle 11g R2
Client-Agent(Browser): Firefox Release 33
Note, this was a fresh install from a lower version that was upgraded
several times up to the current APEX release.
LOG IN to Site-Designer with an account that has DEVELOPER or ADMIN level user privileges.
USE your own values for WORKSPACE, USER, PASSWORD.
CREATE a new PAGE level OBJECT (REGION, FORM, REPORT, etc.) and stop in the middle of the set-up wizard.
RIGHT-CLICK on a TOP LEVEL Menu item such as SQL WORKSHOP. Open it in a NEW WINDOW;
CREATE an object like a TABLE which can be used by the DESIGN WIZARD open in step 3.
The reason for trying to keep different browser sessions open for the same USER account allows users to go back to another section of the design tool to build other objects or app/page elements that were overlooked before initiating a design wizard process.
Observed Behavior:
The new session will allow the user to make a new database object, but when clicking back on the previous window with the session that is running the original wizard, the server prompts for a new log in because that session has been closed.
Thanks!
The solution I found when facing a similar situation was opening Apex in a couple of different web browsers in parallel, so i have Safari for the SQL workshop, and Chrome for the page designer..
so instead of ctrl-tab i use cmd-tab (or alt-tab for PC)
Our IT said it has something to do with session state..

Invalid object name 'Student' while running IIS webservice using SQL Server 2005 database

I created a web-service using asp.NET and the database is created using SQL Server 2005. Then I published it to be able to use it from an Android device. I used the IIS Manager to publish it as local IIS. the publishing is done well but when I try to Browse my web-service, the home page of the web-service appears in the browser. But when I try to test one of the methods that uses the database to retrieve some data, (Select * from Student) where Student is a table in my SQL Server 2005 database, an error page appears stating that: System.Data.SqlClient.SqlException: Invalid object name 'Student'.
I searched and found some people said that I should add (dbo.) in the query (Select * from dbo.Student) but it doesn't work too. the same error occured: Invalid object name 'dbo.Student'.
The result of the query returned correctly from Visual Studio when right-clicking the file *.asmx and choose to View in Browser. But it's not returned from the published web-service.
This is my connectionString
Should I give permissions somewhere?! I do't know how to do permissions on the database tables.
Any help will be appreciated.
THanks..

Drilldown not working in Siebel

The "Type" field is configured with a drill down object. And i checked the responsibilities associated with the view to which i have to drill down.
I possess all the responsibilities associated with the view.
I also checked if the View was active and found it to be active in Tools.
Still i dont have the hyperlink in the values of that column in my client.
The "Type" filed is part of "Account Activity List Applet".
And the view that i have to drill down is "Activity Detail Summary View".
After duscussion in chat appeared that when server SRF is copied to dedicated client (Client > Objects> ENU > siebel_sia.srf) the drilldown is missing. But after compilation drilldown reappears. So the issue is definitely in server SRF file. To update configuration you have to copy updated SRF file to the appropriate directory on the server and restart application. Also there is method that doesn't need application server restart, see this link for details.

Access 2013 on SharePoint 2013 Online - Multiple Questions

Very long time since I even look at Access.. but on SPO, with a database on Azure it seems really nice ... wondering tho..
Any way to remove that left pane with the Databases from the UI?
Set a list button to go to a URL formatted using selected column fields in the row?
Join in oData datasource like SharePoint Online List? Validate against SharePoint list Data? set dropdowns to lookup using SharePoint list data?
Any file upload control and upload to a sharePoint Library? A way to add metadata to a file and do some validation - like does file exist with this metadata. Dynamically rename files to some unique string.
Perform complex field validation with REGEX?
Secure the application and database to SharePoint groups.
What's the business language of choice? Not clear on how to edit and save macros. Can it make calls to webservices?
Any way to change that obsure url you get for the App in SharePoint 2013 Online?
Any way to remove that left pane with the Databases from the UI?
No, but there is a workaround. Right click on the tables you don't want to be visible, and select the option to hide them individually. You can also rename the table-views in that pane, so they appear to have more user-friendly names for your end-users.
Set a list button to go to a URL formatted using selected column fields in the row?
The best way to achieve something like this would be using a hyperlink control attached to a calculated column in your table/query where the URL and display text are computed and linked together automatically. If you need list functionality, you can allow the user to select an item in the list, and have that automatically update a separate hyperlink control to provide the link functionality.
Join in oData data source like SharePoint Online List? Validate against SharePoint list Data? set dropdowns to lookup using SharePoint list data?
Access 2013 Web Apps cannot pull external data at this time. Access 2013 Web Apps only accept incoming data connections e.g. a MS-SQL or oData service can use industry-standard methods to connect to your Access Web App and validate data.
Any file upload control and upload to a SharePoint Library? A way to add metadata to a file and do some validation - like does file exist with this metadata. Dynamically rename files to some unique string.
The only file support currently provided by Access Web Apps is in the form of images uploaded to an image field inside a table. This is useful to add people's photos to their records in a "contacts" table, and things like this. Other than that, you will need to use a custom SharePoint library interface for this type of functionality.
Perform complex field validation with REGEX?
Not currently supported to my knowledge.
Secure the application and database to SharePoint groups.
This functionality is handled within SharePoint, not within Access or SQL Azure. Secure your SharePoint site collection as needed, and these security settings will apply appropriately to read and/or write operations by SharePoint users within your database. e.g. a SharePoint "visitor" (read-only access) will not be able to edit any data in your database - only view it.
What's the business language of choice? Not clear on how to edit and save macros. Can it make calls to web-services?
In Access 2013 Web Apps, VBA is no longer supported. Macros have to be written using the GUI "wizardy" macro interface, which greatly limits the scope of available operations. As a result, you cannot perform more complex tasks, such as making calls to external web-services. However, for basic data operations and UI operations, the GUI macro interface serves the purpose well.
Any way to change that obscure URL you get for the App in SharePoint 2013 Online?
The URL is randomly assigned when you create an Access 2013 Web App, but is guaranteed to never change after it is assigned. Therefore, you could reasonably use your DNS/web-host to "mask" the URL with a CNAME or other type of HTTP redirection. There are many ways to do this, and they are all external to SharePoint and Access 2013 Web Apps, so it's up to your DNS and web providers to support this.

How to show browse button in custom OleDB driver

I am writing a custom OleDB provider using ATL. It connects to a file-type database. The driver functionality is complete, except for one omission.
In the Data Link properties dialog for the driver, the user has to manually type in (or paste) the required filename in to the DataSource edit box. I would like it to have a browse button for the file, as the MS Jet OleDB driver does. Is it a DBPROP structure that provides this functionality, where you can specify that you want to allow the user to browse, and also the file extension filter?
Many thanks for any help in advance.
Here's a sample provider that prompts for a path, maybe it helps:
http://msdn.microsoft.com/en-us/library/ms715011(v=VS.85).aspx