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.