Hi,
I've been looking for a solution to have my existing SQL Server database which contains some tables with columns of the data type geometry published as a feature service by ArcGIS for Server without converting the database to a "special" ESRI Geo database by adding other tables.
After long times of searching and trying and failing I've given up.
What I'm trying to do is to show and edit the data using an HTML5 arcgis web map application.
Is it possible to accomplish what I'm trying to do here?
If so, could you please provide me a step-by-step tutorial on how to set up and have it working?
Thanks in advance!
-Kawa
Solved! Go to Solution.
You can edit within the Javascript API but you would have to create a service to interact with the database. You may want to look into using jQuery and Ajax to do this. You can do it all within the js api but you will have to extend it. You can also use asp.net and js api to write the app. If you want to create a separate app for editing you can just create an asp.net app for editing purposes only and keep the two functions separate.
Here is a link I came across that shows how to insert data in sql server using jQuery and ASP.NET. You could extend it to full editing. Insert Data Into SQL Server Using jQuery in ASP.Net
Add your data as a query layer, ArcGIS Help 10.1 . This will allow you to view your data directly from your database. You can create an msd file to pubclish on ArcGIS Server. Make sure you are using a database connection that is visible for public consumption if you intend to allow the public to view your site.
Editing the data can be done using some application to edit your database. That can be written using a windows app or a web app depending on your goal.
Hi Reynald,
Thanks for your response!
So what you're saying is that it's only possible to use the arcgis js api to view/query the data, not for adding/editing?
Because I've already succeeded in having the data available for viewing/querying, the problem that I'm facing is that the feature service which I'm publishing is not giving me the options to enable "edit", "add" and "delete".
Thanks again.
-Kawa
Kawa,
I am actually at the beginning stages of what you are attempting to do without editing. Sorry I can not offer a solution but if you don't mind, do you have any resources that helped get you to where you are (I know that's a loaded question)? As you know searching is a pain and can take some time to get a clear, if any, answer so any time you can save me will be much appreciated.
Thanks!
Mat
Hi Mathew,
I don't remember where I found the resources that helped me, but I can help you come further anyway.
First thing is, I'm using ArcGIS for Server 10.2.2
Now you've created the connection to the database in the server, the next this is to create the service.
Now you can publish this as a service
That's it!
Best of luck.
-Kawa
Thanks for that info. I actually made a lot of progress yesterday researching and successfully published a Geodata Service on our server. In order to access the data to use in my js webmap, I found this article: ArcGIS Help (10.2, 10.2.1, and 10.2.2) Don't know if that helps you out at all.
You can edit within the Javascript API but you would have to create a service to interact with the database. You may want to look into using jQuery and Ajax to do this. You can do it all within the js api but you will have to extend it. You can also use asp.net and js api to write the app. If you want to create a separate app for editing you can just create an asp.net app for editing purposes only and keep the two functions separate.
Here is a link I came across that shows how to insert data in sql server using jQuery and ASP.NET. You could extend it to full editing. Insert Data Into SQL Server Using jQuery in ASP.Net
Well,, thank you!
So it's not going to be as easy as I thought
I'm going to try to do as you suggested.
Thank you for your help!
-Kawa
We don't have the latest and greatest so we have to come up with other methods for editing data. We are constantly about 2 versions behind from Esri's releases.
What version of ArcGIS are you using?
The capability to publish data as a feature service from a simple database was introduced at 10.2.