Yes, it's possible to connect to a database with Javascript in certain limited situations:
1. Use server-side Javascript. But remember, server-side Javascript is a different animal from the Javascript you use in your browser, so there is no magic here. Basically it works just like any other server scripting language does (PHP, Perl, ASP, etc...): it interprets the contents of a web page before serving out to the browser. Server-side Javascript can be used in Netscape's webserver, or in a Windows IIS/ASP system. (Yes, you are not limited to VBScript)
2. Use a Microsoft IE4+ proprietary extension called Data Binding, which does allow you to use client-side Javascript (actually JScript), but it is not considered a good programming practice to use in a public website, since it is a definite security risk, and I believe it involves special ODBC settings on the client computer. This usage is usually limited to small Intranets.
3. Mixed: use a server-side language to query parts of the database (be careful with the amount of data you send), then serve it to the browser as a Javascript array, thus allowing you to do client-side data manipulation without waiting for every small update. When client-side manipulation is done, you can flatten the Javascript array and place it in a hidden form field to send back to the server. This approach can be a little difficult to program, but can make a web-based application act more like a 'real' piece of software.