将JavaScript函数的值插入SQL Server数据库
16lz
2021-01-22
Is it possible to add a JavaScript variable in an SQL Server database database (run an SQL query or stored procedure)? If so, how?
是否可以在SQL Server数据库数据库中添加JavaScript变量(运行SQL查询或存储过程)?如果是这样,怎么样?
5 个解决方案
#1
3
With JavaScript only, no you cannot (unless you're using Node.js of course).
只使用JavaScript,不能不能(除非你当然使用Node.js)。
The point is, you'll need some server-side code to interact with your database. You can use JavaScript in the browser to make an Ajax call to a server-side script (PHP, Ruby, Python, ASP.NET, Node.js, etc.) that performs the interaction with the database.
关键是,您需要一些服务器端代码来与您的数据库进行交互。您可以在浏览器中使用JavaScript对服务器端脚本(PHP,Ruby,Python,ASP.NET,Node.js等)进行Ajax调用,以执行与数据库的交互。
更多相关文章
- 我如何捕获并插入Meteor.Error警报从Meteor.Methods到客户端数据
- php从PostgreSQL 数据库检索数据,实现分页显示以及根据条件查找数
- 使用php Ajax在数据库中插入动态数据
- 如何使用客户端Javascript数组并通过节点发布。将js API插入Mong
- 如果外部应用程序更改了持久模型(服务器数据库),AngularJS可以自
- Javascript来自数据库的图像上的图像映射
- 将敏感数据存储在数据库中,建议
- 使用特定顺序的ID列表从Django数据库中获取记录
- 用于Python项目的低内存和最快查询数据库