Accessing SQL Server database from Javascript

S

Scott Castillo

Is it possible to access an SQL Server database from a Javascript client? I
know you can transfer variables from middleware to Javascript client, but
was wondering if you can directly access database from client?

Thanks for any response.

Scott
 
R

Richard Cornford

Scott Castillo said:
Is it possible to access an SQL Server database from a Javascript
client? I know you can transfer variables from middleware to
Javascript client, but was wondering if you can directly access
database from client?

Javascript as a language has no knowledge of or interest in databases.
Javascript is used in order to script an object model and any facilities
for database access and the like would have to be provided by the object
model being scripted. Common browser object models do not include a
mechanisms for accessing databases. There are mechanisms that can be
used but most would come under your category of "Middleware". But it is
questionable whether it would be a good idea for database access to be
initialised with javascript as there is little that can be done to
prevent access to the source code, and any reader of the source code may
gain access to enough information to take advantage of, or deliberately
damage, the database.

Richard.
 
S

Scott Castillo

Thanks for the reply.

I was thinking that in a very simple scenario, the security could perhaps be
taken care of somehow with a little thought. But seeing as how its not
possible, I'll stop thinking about it.
 
D

Douglas Crockford

Is it possible to access an SQL Server database from a Javascript client? I
know you can transfer variables from middleware to Javascript client, but
was wondering if you can directly access database from client?

It is nuts to allow access to a database from Any client. Certifiably
insane. Not smart.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top