Connecting Tech Pros Worldwide Help | Site Map

Accessing SQL Server database from Javascript

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 20th, 2005, 02:29 PM
Scott Castillo
Guest
 
Posts: n/a
Default Accessing SQL Server database from Javascript

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



  #2  
Old July 20th, 2005, 02:29 PM
Richard Cornford
Guest
 
Posts: n/a
Default Re: Accessing SQL Server database from Javascript

"Scott Castillo" <scasti2@cox.net> wrote in message
news:z0SWb.40310$P17.11527@fed1read03...[color=blue]
>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?[/color]

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.


  #3  
Old July 20th, 2005, 02:29 PM
Scott Castillo
Guest
 
Posts: n/a
Default Re: Accessing SQL Server database from Javascript

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.


"Richard Cornford" <Richard@litotes.demon.co.uk> wrote in message
news:c0gs32$klr$1$8302bc10@news.demon.co.uk...[color=blue]
> "Scott Castillo" <scasti2@cox.net> wrote in message
> news:z0SWb.40310$P17.11527@fed1read03...[color=green]
> >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?[/color]
>
> 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.
>
>[/color]


  #4  
Old July 20th, 2005, 02:29 PM
Douglas Crockford
Guest
 
Posts: n/a
Default Re: Accessing SQL Server database from Javascript

> Is it possible to access an SQL Server database from a Javascript client? I[color=blue]
> know you can transfer variables from middleware to Javascript client, but
> was wondering if you can directly access database from client?[/color]

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

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.