1

Is there a way to connect to an SQL database without using ASP/ASP.NET, PHP, etc.?

And using only Ajax, JQuery, etc.? Thanks.

8
  • In practicality it would be a huge security risk. I don't think there are any drivers for SQL server that could interpret the calls. The browser won't be able to handle the communication. Do you need this for some sort of production program, or just S&G's ? Commented Nov 17, 2011 at 20:12
  • 3
    If by "etc.", you mean "Java" or "Ruby", then yes. Otherwise, please don't do this. Commented Nov 17, 2011 at 20:19
  • 2
    Could you also let us know for what purpose you would like to use such an approach? I'm curious to find out because it seems like there's a huge security risk looming.. Commented Nov 17, 2011 at 20:25
  • 1
    Ajax doesn't "do things server side" it's just Javascript that sends requests back to the server, the server makes the DB and other calls, then returns it to the browser. Commented Nov 17, 2011 at 20:32
  • 1
    Whatever language you're most comfortable with will work. But you will need server side code to accomplish this. PHP, Java, C#, C++, Python, Perl … Commented Nov 17, 2011 at 20:47

3 Answers 3

2

I don't want to have to build or anything.

Well, you're going to, willing or not. Have a look at Creating an OData API for StackOverflow including XML and JSON in 30 minutes for how to 'build' such a feature using ASP and Endity Framework to expose an OData API.

Sign up to request clarification or add additional context in comments.

Comments

1

SQL Server supported Native XML/SOAP endpoints: http://technet.microsoft.com/en-us/library/cc280436.aspx

Now deprecated in SQL Server 2008

Now of course this would mean that your SQL Server had to be able to handle HTTP requests from the client - which might be on the Internet. But it's possible, regardless of the wisdom of doing so.

Comments

0

It's not "SQL", but I think you use CouchDB as your database platform - that supports a REST/JSON API for querying:

http://couchdb.apache.org/

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.