This Question is Assumed Answered

1 "correct" answer available (5 pts) 15 "helpful" answers available (3 pts)
7 Replies Last post: Apr 23, 2008 11:36 AM by mgordon

Hows does one use curl in order to let people who view your website edit and modify tables designed with microsoft sql server

Apr 15, 2008 1:20 PM

Click to view mrsdewinter2's profile Level 1 mrsdewinter2 1 posts since
Apr 15, 2008
I am new to the Curl programming language and I do not have that much programming experience but I have been given a task to do that involves letting users who view the website i am going to design and edit tables and add information from the webpage i.e making an interactive website. the database must be designed using Microsoft SQL server 2005 so how would i use curl to do this allowing certain users to edit tables and add information in columns that need to be displayed on the website. We were orignally tasked to use ASP. but eventually we have to design an interactive 3D map as well that users can edit so thats why I chose to use curl. So could you please give me some pointers if possible on the database problem. And also if you have some pointers on 3D objects since I want to add a vrml or googlesketchup 3d building i drew to a map and i want users to be able to manipulate it and turn it when they visit the website. Also can one integrate ArcGis objects like shape files and mxd(map files) with curl so that users can have access to and maipulate the maps from the website like switching layers on and off and online digitizing

Thanks Taryn
Click to view cbarber's profile Curl cbarber 72 posts since
Sep 27, 2007
1. Re: Hows does one use curl in order to let people who view your website edit and modify tables designed with microsoft sql server Apr 15, 2008 2:11 PM
Regarding database interaction, you should read the chapters on Data Management and Display in the Curl Developer's Guide. The chapter named Managing Data from External Sources describes how you would communicate with SQL server using its JDBC driver. You can read the Curl Developer's Guide online here, but it is better to read them in the Curl Documentation Viewer in the IDE.

Regarding 3D model formats, I do not believe that the standard RTE libraries includes support for loading 3D models, but there may be some external libraries available. Hopefully, someone with more graphics knowledge than myself will be able to give you a better answer.
Click to view Duke's profile Curl Duke 116 posts since
Oct 17, 2007
2. Re: Hows does one use curl in order to let people who view your website edit and modify tables designed with microsoft sql server Apr 15, 2008 2:28 PM
You can use ASP if you want. You can dynamically generate Curl files in the same way you can dynamically generate HTML, except you change the MIME type.

For the tables that interact with the database, you can look up the index entry for "data access" in the Curl IDE's included documentation. For the actual connection to the database, you can look up the index entry for "data file connection". You might also be interested in the open source projects described in http://developers.curl.com/community/curl_open_source, where there is the WSDK for web services and the Curl Data Kit which might be of use.

For the interactive 3D map, you should look up the index entry for "Scene". I do not know of any available code that can read the ArcGis files.

Curl 6.0 also has some new features which might let you mix Curl with other available tools. The IDE's "Getting Started" Developer's Guide section has links to the following new features:

1. Support for communication with JavaScript.
2. The class EmbeddedBrowserGraphic, which enables you to embed a web browser in a Curl Graphic.
Click to view Damian's profile Curl Damian 5 posts since
Nov 7, 2007
3. Re: Hows does one use curl in order to let people who view your website edit and modify tables designed with microsoft sql server Apr 15, 2008 3:20 PM
in response to: cbarber
cbarber wrote:Regarding 3D model formats, I do not believe that the standard RTE libraries includes support for loading 3D models, but there may be some external libraries available. Hopefully, someone with more graphics knowledge than myself will be able to give you a better answer.

Christopher is correct. If you understand the file formats you want to read, then it is very easy to generate Curl code that can instantiate 3D objects using the Scene API. (PolygonSet is most likely the object you would use to represent a 3D data set, or a portion of it.) However, the RTE does not presently include support for loading any 3D file formats.

Since VRML is a documented, standard, text format, it ought to be pretty straightforward for you to implement code to read it. (If the application producing the VRML is under your control, you may not need to worry about all the flexibility of the language, either, just the features & structures you use.) Wikipedia's page on VRML is probably a good place to start.

Damian


Click to view URPradhan's profile Level 6 URPradhan 108 posts since
Mar 6, 2008
4. Re: Hows does one use curl in order to let people who view your website edit and modify tables designed with microsoft sql server Apr 16, 2008 2:12 AM
in response to: Duke
You can read the topic "Using Record Sets with a Database" that describes the procedure to fetch data from any RDBMS like MS Sql Server, MySql or ORACLE. you need a JDBC driver for your database.

But, another query to experts like ...
While we configure the server.xml file we are hard coding the user name and password in the Resource section under CDBC configuration
So that whenever any request comes from clients it uses the above credential to access data.

But probably Taryan wants to modify the data for privileged users. So, what should be the server.xml file configuration to support such requests. We can pass the user name and password with in the function "BasicConnection <url>, <username>, <password>".
Lets say, first every user has to provide their credentials (if they want to modify data, else by default it will use a guest account) and we will pass that user credential to server through the BasicConnection function. So that we can give editing features to specific users for the database.

//Thank you
Click to view URPradhan's profile Level 6 URPradhan 108 posts since
Mar 6, 2008
5. Re: Hows does one use curl in order to let people who view your website edit and modify tables designed with microsoft sql server Apr 20, 2008 9:21 PM
in response to: URPradhan
Anyone will help for the above MySql connection per user basic ?
Click to view friedger's profile MVP friedger 95 posts since
Jan 13, 2008
6. Re: Hows does one use curl in order to let people who view your website edit and modify tables designed with microsoft sql server Apr 22, 2008 2:29 PM
in response to: URPradhan

Probably a bit off topic but related to 3D models: I have added a simple example how to parse a VRML file an create a PolygonSet from it. See VRML Parser using macros

Friedger

Click to view mgordon's profile Curl mgordon 36 posts since
Oct 17, 2007
7. Re: Hows does one use curl in order to let people who view your website edit and modify tables designed with microsoft sql server Apr 23, 2008 11:36 AM
in response to: URPradhan
The JDBC driver we are using authenticates with credentials from the server.xml file, so all users have the same privileges. If you want different users of an applet to have different privileges, you need to do it on the client side. You could implement a login in the client applet, and only provide editing functionality to the appropriate users.

The username and password passed to BasicConnection is used for HTTP "basic" authentication. That can be used to prevent unauthorized users from getting any access at all to the CDBC server. For example, if you use https and configure your web server to require a username and password to access the URI for the CDBC servlet (such as https://localhost:8080/cdbc-server/) then the traffic to and from the server would be encrypted and the servlet would only be accessible to people can authenticate with the server. Of course the applet would have to prompt the user for the credentials, and not store them. Needless to say, you need to be extremely careful if you really want to expose a database on the internet.