Our client has an MS Access application which we want to link to a SQL Server database.
We want to write some sort of WCF service to provide the Access Database with the correct data from our SQL Server.
But where should I start with this?
And suppose I already have create the service.
Why can't I add any external services in my Access app?
It's greyed out and I haven't got a clue why.
Does anyone have experiences with this type of solution?
I don't think anyone does have experience as to do it in Access would be very difficult. You can create Linked tables in access, which look just like Access Tables, but are actually linked to a table in a SQL Server db, but that's not what you want. There is no 'natural' way to link a table to a WCF Service.
However, it might be possible, with an enormous amount of work, that you could call the WCF service and unserialise the returned XML data via VBA code within the Access application. I would not personally attempt it, and would discourage all but my worst enemies from doing so.
Why can't I add any external services in my Access app? It's greyed out and I haven't got a clue why.
The "Data Services" option is only available from within .accdb files. It is greyed out if an .mdb file is open.
Related
I am a beginner at SQL Server, data storing and web technologies so I don't know how to accomplish what I try to achieve. I am a hobby C# programmer and let's pretend that my program allows you to enter a text, like an article, so its a huge basic string.
I am using SQL Server 2014 Express, and I know that it is possible to set it accessible for other users through the internet. Currently I only have small amount of data in it. Because I have read on the internet that it is never a good a idea to store e.g. a huge string in it and it's not the way to go.
I've heard that you could save the storage location of that string object in the SQL Server database and access it with that.
So that is my question if this way above is a good working solution. So that I save data e.g. in a VM and make this VM accessible for the internet with user identification and the SQL Server database gives you the information to connect to the VM's data and the information about the storage location of the requested object. I want users to be able to up- and download data from other users but all the data is in one public place. (like a VM on my pc or a different pc)
As I am a student, I don't have money for a web service or web server but I am curious about your opinion to the whole subject. I don't want any code from you, just the idea about the way of global data storing/sharing these days.
SQL Server is a database so yes, it can hold information (even a huge string which would be a data type called varchar(max) or nvarchar(max) depending on if you need it to hold other languages. If you are putting the code on a web server and then a SQL Server in a VM though I wouldn't give permission to the VM to the internet, I would just give it permission to access the web site and have the website put/pull information from the database. You might want to look into something like SQLite though - SQL Server could be overkill if you are only looking to store one string.
SQLite is free so you wouldn't have to pay for it. Pretty much any database can store images as a binary object so you can do that in SQL Server or SQLite. A tutorial for SQLite is here: https://www.codeproject.com/Articles/196618/C-SQLite-Storing-Images
MySQL is another option - it really just depends on how robust you need the server and what you are attempting to do with your web code as to what would be the best fit.
I wouldn't make any VM accessible to other people on the internet ever, unless it was behind some sort of VPN and protected appropriately and those people were part of your organization. What you are looking to do is set up an API where users can register, obtain a valid API token then make requests for certain information that could be in your database.
If you are learning, a PHP REST API (or any REST API in a language you like) in conjunction with MySQL is usually a good place to start with lots of documentation. You can do this with frameworks like laravel or codeigniter.
If you want to stick with Microsoft's SQL server you will probably run into some licensing issues should you ever expand. Beyond that, I am not too familiar with asp.net / vb.net (microsoft's frameworks)
Best of luck on your searches.
Good day, i have basically no experience in sending information over the internet, so excuse me if this is a little to DUH for you, i am trying to better my understanding.
What i have is a mysql database hosted somewhere on the WWW which is populated with a web application, i also have a local database stored on my ..local machine, which is populated via a windows form created in C#.
All of the above works like a charm.
What happens is, the web site creates some data in ONLINE_TABLE_ORDER.
The local app does some dark magic (based on data in ONLINE_TABLE_ORDER and populates TABLE_1 in the local mysql database, then TABLE_2 stores a bunch of data based on whats going on in TABLE_1.
On the click of a button its time to send ALL the data from TABLE_2 to ONLINE_TABLE_STATS which is the online mysql database and keeps updating the same table for statistical purposes.
What i need to do, is to send the rows of data from ONLINE_TABLE_ORDER to the local database, the C# windows form will then automatically pick up the details and populate various controls, when all is said and done the application will then need to send rows of data from TABLE_2 to ONLINE_TABLE_STATS where the web form will then pick up this new data and display it accordingly.
That being said, i now need to figure out how to go about sending all of this.
This is where WCF and web services comes in.(i guess, its what information i have managed to wring out of google).
Now i would like to do this via services to maintain data integrity (local internet is shitty, and could cut out at anytime, so i am hoping that web services can help with that).
Finally, this is where my understanding needs some TLC,
1: Can a WCF service form part of my C# application; in that the application pulls data from the web based mysql database and then pushes data back to that database?
2: Can a WCF service run by itself from within the local application? or does the server on which the web database is hosted also need a WCF service running?
3: Does only the online server need a WCF service running? (create an applet in C#?)
4: Is this all overkill and i dont actually need any services when a simple bulk insert statement suffice? (remember shitty internet).
Remember, i would like the service to handle
ONLINE_TABLE_ORDER --> TABLE_2 --> ONLINE_TABLE_STATS
No, i am mostly self taught and am really eager to learn more about this, even if it is overkill; as i have been checking out tutorials and blogs, none have actually given me sufficient answers to the above.
Most, deal mainly with application to hosted database but have yet to find one from database to database which is what i am trying to do.
So in closing, if you can help my understanding as well as leave some kick ass links to great reading material, id really appreciate that. If you lovely individuals require anymore information about the how's or why's, leave a comment and ill edit my question.
I think you need to comunicate from your CSharp app to your online database via web services like you said. So, you need a WCF service hosted online with access to the database (or other kind of service, like an api in the online web site who have access to the databse). Also you need a service client in your CSharp app who comunicates with the online server.
So answering to your numbered questions:
A WCF can be hosted in a C# application (called "self hosted service" or something like that) but it does not resolve your problem. Your CSharp app should be client not service.
Basically the same answer than before
The online server need some kind of service who interacts with the database listening to http request. So, WCF is a good alternative. You can use another kind of web service, like a api service in the web application
In MY OPINION i think you need a service who controls security, data transport and a lot of stufs
I have an application that currently runs in MS SQL Server Standard in multiple clients/local server. The program was builded using WPF + StoredProcedures/functions/triggers, and there aren't MS Jobs.
I want to create an desktop version of my application, where the user can save all the data to a file and load it in another desktop with the program running.
I never done this type of application before, and I have a few doubts about how I should do this, I don't know if what I'm planning is going to work.
Basically, I was thinking in install my application with SQL Server Express and to save/restore it to files, I thought about calling backup/restore database through storedprocedures.
Am I thinking right? Is there a better way to do this?
I'm not sure I understand why you would need to export the entire contents of the database to a file. The central database should be accessible by all of the client applications, avoiding the need for the client application to have its own dedicated copy of the database. But ... if this is really what you want, then I think your two options are:
1.) Use Backup+Restore.
2.) Use LocalDB with the AttachDbFileName property, which is designed to keep your database in a single self-contained local file that you can read/write without having to connect to an actual database server. Some starting info here.
I have a client that needs me to set up a website that pulls sql reports from a separate server. Currently the only way to access the url to the reports server is to first rdp into that server. I tried creating a web services proxy class, but the url was unable to resolve due to the added protection.
Is there any way for me to pull the reports in my asp.net application from the other server without removing the rdp? This is my first time trying this, so im not sure if i am going about this the correct way or if it is even possible to access that server from the client web application with the rdp in place.
EDIT
All my application needs to do is display pre-made reports to specific clients/groups based on their login credentials. These clients/groups will not be creating or altering reports(at least not at this point in time).
I think you'll find its most likely not possible or probably very hard to do.
Perhaps you could obtain a copy of the database through replication or maybe a nightly bulk update and run the report against that, perhaps you could script a machine to remote desktop in and share the drives on it and get it to backup the db or similar.
In any case if you can't get a copy of the database I don't think you could feasibly generate any kind of report that allows user input to generate it.
EDIT:
It looks like this answer will get you started in connecting and triggering a file copy
I have a silverlight application which reads data from a db and displays them in a grid.
As far as i understand it there are two ways to do it.
1) Read db with a server-side language, such as php, create a file in the server which you can later use in Silverlight to read the data.
2) Connect "directly" using Silverlight code with your db and do your job there. I have read some posts that explain more or less how this is possible, but i haven't found a working example.
I really need to go towards the 2nd approach. Can anyone provide a simple example on how to connect and query to your mysql db safely from Silverlight?
Thank you.
You could use the MySQL connector for Entity Framework and then connect to the database using .NET RIA Services.
Whatever route you go you're going to need to create some method to read data from the database on the server and return that to Silverlight as objects.
Silverlight runs on the client side in the browser, there is no way to directly hit a database. The way to get data is to hit a webservice, you could use ADO Data Services but they only run Sql Server in their cloud.