Windows平台下FreeSWITCH的Lua脚本连Microsoft SQL Server 2K8
来源:互联网 发布:魏则西的回答 知乎 编辑:程序博客网 时间:2024/04/29 17:54
正确的脚本如下:
local dbh = freeswitch.Dbh("lptcc", "sa", "password")dbh:query("SELECT id, ext_id FROM ExtensionDevice", function(row) freeswitch.consoleLog("NOTICE", string.format("%d[]%s\n", row.id, row.ext_id))end)
有两点需要注意:
一、连接方式
之前的连接数据库代码是这样的:
local dbh = freeswitch.Dbh("odbc://lptcc:sa:password")经测试,官方文档里给出的这个连接方式在Windows平台下无效。
二、ODBC数据源
在控制面板内设置数据源时,一在系统DSN下创建,其次切记要将缺省数据库设置为想要操作的那个数据库。否则查询时会报,无效的对象。
0 0
- Windows平台下FreeSWITCH的Lua脚本连Microsoft SQL Server 2K8
- SQL Server 2005 Reporting Services (x64) on Windows 2K8 -> CleanCurrentUserName() not found
- 分区表理论解析(下):SQL Server 2k5&2k8系列(二)
- 实战分区表:SQL Server 2k5&2k8
- 实战分区表:SQL Server 2k5&2k8系列(三)
- Windows平台下的C++调用Lua
- Windows平台下LUA环境的搭建
- Windows平台下的C++调用Lua
- 在windows 7下安装了microsoft SQL server 2005
- freeswitch会议模块lua脚本
- FreeSWITCH 中的lua脚本里使用cjson的办法
- Lua基础(2)--Windows平台下的Lua环境搭建
- 《FreeSWITCH: VoIP实战》: 一个在FreeSWITCH中外呼的Lua脚本
- 值得收藏的Microsoft SQL Server下的SQL语句
- 值得收藏的Microsoft SQL Server下的SQL语句
- 值得收藏的Microsoft SQL Server下的SQL语句
- 值得收藏的Microsoft SQL Server下的SQL语句
- 值得收藏的Microsoft SQL Server下的SQL语句
- java多进程 -CD7-孙鑫-(3)-从实现Runnable接口来实现多线程
- 网上流行护眼色的RGB值和颜色代码
- VC6中在classview中看不到已有类 的解决
- 黑马学员《反射》
- 存储器层次结构基础(一)
- Windows平台下FreeSWITCH的Lua脚本连Microsoft SQL Server 2K8
- powerdesigner中association图标灰色不能用
- poj 1095 catalan and binary tree
- LINUX mount.nfs: Input/output error
- Timer:定时器
- SQL笔记
- MFC给按钮添加图片
- Intellij使用的一点经验
- Get the image moments and the others related with it