如何从 javascript 连接到 pointbase 数据库?
我正在开发一个项目,需要从 javascript 连接到 pointbase 数据库。我对java脚本了解不多。是否可以从java脚本连接到pointbase?请帮我提供示例代码。
先感谢您。
I am working on a project in which I need to connect to pointbase database from javascript. I do not have much knowledge about java script. Is it possible to connect to pointbase from java script? Please help me with a sample code.
Thank you in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
JavaScript 用于客户端编程。如果您的意思是您有一个 Web 界面,希望连接到服务器端数据库,则需要使用服务器端脚本(perl、php、asp...),然后可以使用 JavaScript 和 AJAX 与远程数据库。
JavaScript is for client side programming. If you mean you have a web interface you wish to connect to a server side database you need to use Server Side scripting (perl,php,asp...), you can then use JavaScript and AJAX to work with the remote database.
Javascript 不是 JavaScript。
Javascript 是一种用于操作网页的客户端语言。它几乎无法访问文件(或数据库)。
您需要一种服务器端语言(例如 Java)来连接到数据库。您可能需要使用 JDBC (您需要 Pointbase 数据库。
您可以从 javascript “调用”此服务器端程序取决于您的架构。
Javascript is not Java Script.
Javascript is a client side language for manipulating webpages. It has almost no access to files (or databases).
You need a server side language, like Java for connecting to the database. You may want use JDBC (You would need the drivers for the Pointbase database.
You can "call" this server side program from javascript. How you do depends on your architecture. Do you already have a Java web app (a Java EE app) running?
javascript 不仅仅是一种前端脚本语言。它可以被任何 JavaScript 引擎使用,但典型用法是用于 Web 浏览器中的前端代码。 Java/.net/php 更适合服务器端处理。有可以运行 javascript 的服务器端引擎:
http://en.wikipedia.org/wiki/Comparison_of_server -side_JavaScript_solutions
javascript is not only a front end scripting language. It can be used by any javascript engine though the typical usage is for front end code in a web browser. Java/.net/php are more natural fits for server side processing. There are server side engines that can run javascript:
http://en.wikipedia.org/wiki/Comparison_of_server-side_JavaScript_solutions