SQL存储过程调用DLL
2006-12-30 15:50
316 查看
dll程序源码为:
头文件:
#ifndef UNIT1H
#define UNIT1H
extern "C" __declspec(dllexport) __stdcall void messbox();
#endif
cpp文件:
#include <vcl.h>
#include <windows.h>
#pragma hdrstop
#include "unit1.h"
#pragma argsused
int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void* lpReserved)
{
return 1;
}
//---------------------------------------------------------------------------
void __stdcall test()
{
/*测试代码*/
}
make后,把生成的DLL放入了system32目录下。
然后在查询分析器里执行:
sp_addextendedproc 'test' , 'Project1.dll'
exec test
注意:SQL调用扩展存储过程不能有与用户交互的信息(因为是不可能弹出任何窗口的)
头文件:
#ifndef UNIT1H
#define UNIT1H
extern "C" __declspec(dllexport) __stdcall void messbox();
#endif
cpp文件:
#include <vcl.h>
#include <windows.h>
#pragma hdrstop
#include "unit1.h"
#pragma argsused
int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void* lpReserved)
{
return 1;
}
//---------------------------------------------------------------------------
void __stdcall test()
{
/*测试代码*/
}
make后,把生成的DLL放入了system32目录下。
然后在查询分析器里执行:
sp_addextendedproc 'test' , 'Project1.dll'
exec test
注意:SQL调用扩展存储过程不能有与用户交互的信息(因为是不可能弹出任何窗口的)
相关文章推荐
- 用XML和SQL 2000来管理存储过程调用
- .net,调用sql存储过程
- 【转载】Qt调用Server SQL中的存储过程
- (转载)使用DbHelperSQL调用存储过程的方法
- c#调用sql存储过程的步骤
- 存储过程的输出参数为游标,PL/SQL中如何调用 Java代码如何调用
- 通用SQL存储过程分页以及asp.net后台调用的方法
- JAVA调用SQL存储过程详解
- JAVA调用SQL存储过程详解
- 代码调用存储过程超时,SQL Server Management Studio里运行很快
- SQL-server中编写存储过程及其调用
- ASP调用存储过程中与SQL对应的数据类型
- Delphi调用SQL分页存储过程实例
- DBCC大全集之(适用版本MS SQLServer 2008 R2)----DBCC dllname (FREE)从内存中上载指定的扩展存储过程 DLL
- EXTASPNET C# ASP.NET sql server 调用存储过程超时,解决方法
- 步步为营VS 2008 + .NET 3.5(10) - DLINQ(LINQ to SQL)之调用存储过程的添加、查询、更新和删除
- Oracle 动态SQL语句(4)之存储过程的调用与浅谈字符串的使用
- sql存储过程调用
- 解决多线程调用sql存储过程问题