Calling an executable with parameters - c#

My company has an MS Access application, and in the VBA a of this, they have a form with data in the fields. They had me make a C# application that needs to use the data from these fields on the MS Access form.
I could easily send this data to a table and write SQL to access this in the C# application. However, they would like me to make an executable of the C# application and pass the fields in parameters to the executable.
I cannot find anything on this, is it possible? If so, can someone give me an idea of how to do this?
Thanks
No because I cannot find anything on this, and I have no idea how to even start in anyway.

Related

C# Web Application Form using Stored Procedure

As a DBA/SQL Server Developer, I'm often asked to produce web pages where users can view the data in the database and edit them, and see the edits they've made straight away (without refreshing the page). I know nothing about ADO.NET or C#, but I would like to be able to give users this very simple functionality. Essentially I'm looking for three things:
to display a table of data in a webpage retrieved from a SQL Server stored procedure
to display a text box in the same webpage where users can input data
to display a button in the webpage that takes the inputted data from the text box, runs it through the stored procedure as a parameter, and refreshes the table.
Ideally I'd like this all to happen without the user having to refresh the webpage.
My questions are: is this kind of thing possible? How difficult is it to achieve? And how do I do it? I don't have the time to learn web development in full. I wouldn't need the vast majority of skills I'd learn even if I did learn it in full. I just really need this basic functionality, to produce ultra simple pages when user requests come in.
If anyone knows of any examples of just this kind of thing, that I can copy, they would be greatly appreciated!
You don't really need to use MVC, WebForms or even C# for that matter. Using one of those would be killing a ant with a rocket launcher.
Look into node.js and pug, using a RESTFUL API to deliver the information you need. I don't believe you will need more than two hours to provide your users with the interface you told us.
Node has a awesome package called express, it sets up everything for you and uses Pug on the starter template.
You can check out a tutorial right here.
Actually it will also take 2 hours doing with Webforms or MVC . I recommend using Entity Framework to make it super simple.
Webforms may be a bit older technology but will be faster to develop this specific page (assuming you only targeting Desktop users). Otherwise MVC is the way to go.
You can Check the tutorial.
https://learn.microsoft.com/en-us/aspnet/mvc/overview/getting-started/introduction/getting-started

BLOB file to display via a GUI

This is more of a, "hey, any ideas on how to go about doing this?", type of question.
So,
I'm working on a READ-ONLY GUI in Visual Studios, that loads data from an Oracle database. -- I am currently stumped on how to go about doing something: Loading an BLOB file from the oracle database and having it display via the GUI, so that the person reading it would be able to download said file by clicking a logo or text field or whatever works really. The person wouldn't be the ones uploading files; they should just be able to download them from what the GUI is pulling from the database.
Keep in mind, this file should not be limited to a single file type, should be able to upload .pdf, .txt, .wordx, .png, etc)... from Oracle, into Visual Studio.
I'm not sure which tool to use, nor the best way to go about this.
Tried looking it up, haven't really found any examples worth-mentioning or ideas pertaining to loading FROM Oracle into displaying for C#.
Any examples or ideas would be much appreciated.
SQL Developer offers this feature - via Java. You asked about tools...

best way to store strings outside of a program?

I'm currently working on a winforms application that gets information from a user via a textbox. Since this information is not likely to change very often, I would like my application to save the input and load it into the appropriate text box the next time it is run.
I feel confident in my ability to set this up on the form side of things, my question has to do with how to store the values outside of the program. My first instinct is to just use a text file, but the overhead needed to handle IO and reading in the values seems a bit much. I also would rather not have the user editing it outside of the textbox in the program. I tried using string resources, but those are read only. Is there a more elegant solution available?
You need at least a mediocre database client whether it be sql server, mdf, MS Access, SharePoint, Oracle etc. Sounds like a vis studio prog. (winforms). They are designed for IO procedures but requires data architecture knowledge or relational dbs. (RMDBS). Try a lightswitch project (if a VS proj.) to get the basics of db and form data relationships.
I know it's not outside Your program, but you could try settings, it's easy, kinda like the resources ownly in the settings you can change it.
To change settings goto:
Properties and then double click Settings, here you van add strings, bools etc. Make sure you set them to user
To access them through code use:
Properties.Settings.Default.
To save the settings use:
Properties.Settings.Default.Save()

C#: Drupal database access

I am making a C# program that recreates websites in offline mode for use at computers within the company, that are not connected to the internet. These offline websites are identical to their online versions, with all content displayed.
I already have a solution for websites with simple MySQL access, but I need to rewrite the program, so that it can handle Drupal based websites aswell. However, I couldn't figure out how to access Drupal's SQL database, or even what to look for.
The original program uses the website's templates (that are already rewritten in HTML), and places the data mined out of it's database in the templates. Problem is, I don't know where to look for Drupal's templates, or if there aren't any, what data should I gather from it's database.
I use MySQL Connector to reach the database with C#. Should I look for the nodes? If yes, where?
If you want to go down that path you will have to sort of act like Drupal, in order to know which things to read from where. Each module installed has their own tables and functions in a particular way, so not always all the data are nodes with fields.
I you need to work with websites in offline mode, I would suggest using a portable webserver, that way you just copy the website to the root folder and run a script to copy the MySQL database as well, the point being that it's portable, you can carry it around in a flash drive and to run it, you don't need to install anything.
Again, what you want to do is possible, but it will require a tremendous amount of work and you cannot guarantee that things will behave well when you install new modules.
Another approach would be to look into the Boost module, which creates offline, static files based on the request you make to the site, and stores them in a configurable folder.
Another way: build a screenscrapper which reads the HTML from the homepage, and recursively follows the links and modify them before saving the HTML yo your local copy.
Summing it up.. avoid accessing the database yourself and try to read the HTML already rendered.

How to upload applications written in C# onto a website using Drupal?

Please answer for Dummies ;) ... Absolute newbie to web programming, especially new to Drupal. We have some modules written in C#, that access a database in MySQL and works on it (it's a student information system actually. We have some forms created in C#, through which interface student's can enter their details onto the database and we have desktop applications which work on those data). Now we need to create a website so that student's can enter information through the internet. We can not re-write the whole modules in PHP, and we want to use Drupal to create the website. So how to do that?
Not really a direct answer, but some points that you need to consider. How complicated this will be depends on how much interoperability you need between the C# code and Drupal.
Does Drupal need to use the forms written in C# in order to enter the data in the DB, or could data entry be done directly from PHP (As in, is there any validation or processing of data in the C# forms that needs to be done?) If not, it seems like the easiest way would be to build a page in Drupal that can enter the data directly into the MySQL database.
Otherwise, the easiest way to get the programmes to talk to each other might be outputting the data to another format — e.g. XML or JSON. (Here's a similar question with someone using JSON as the intermediary data type) You could have your PHP form create an XML document in a temp folder, with the C# programme polling this folder for new files every X minutes and use them as an input into its application.
It will really depend on your workflow — how immediate does the processing of data need to be? Is the flow of data in/out, or in only — i.e does there need to be a set of results returned to the user?

Categories