Accessing SQL Server database from Javascript

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Scott Castillo

    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


  • Richard Cornford

    #2
    Re: Accessing SQL Server database from Javascript

    "Scott Castillo" <scasti2@cox.ne t> wrote in message
    news:z0SWb.4031 0$P17.11527@fed 1read03...[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.


    Comment

    • Scott Castillo

      #3
      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@litote s.demon.co.uk> wrote in message
      news:c0gs32$klr $1$8302bc10@new s.demon.co.uk.. .[color=blue]
      > "Scott Castillo" <scasti2@cox.ne t> wrote in message
      > news:z0SWb.4031 0$P17.11527@fed 1read03...[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]


      Comment

      • Douglas Crockford

        #4
        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.

        Comment

        Working...