use master
exec sp_addextendedproc csdn,'C:\Documents and Settings\Administrator\桌面\qs\qs\qyym.dll' declare @yy int
exec @yy=master..csdn
select @yy C#的qyym.cs的类:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;namespace qs
{
class qyym
{
public int csdn(){
return 1;
}
}
}
错误显示:
消息 17751,级别 16,状态 0,过程 csdn,第 1 行
在库 C:\Documents and Settings\Administrator\桌面\qs\qs\qyym.dll 中找不到函数 csdn。原因: 127(找不到指定的程序。)。请高手看下,谢谢了
exec sp_addextendedproc csdn,'C:\Documents and Settings\Administrator\桌面\qs\qs\qyym.dll' declare @yy int
exec @yy=master..csdn
select @yy C#的qyym.cs的类:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;namespace qs
{
class qyym
{
public int csdn(){
return 1;
}
}
}
错误显示:
消息 17751,级别 16,状态 0,过程 csdn,第 1 行
在库 C:\Documents and Settings\Administrator\桌面\qs\qs\qyym.dll 中找不到函数 csdn。原因: 127(找不到指定的程序。)。请高手看下,谢谢了
注册该类库:打开 SDK 命令提示 工具,输入
public static int csdn(){
return 1;
}
use master
exec sp_addextendedproc csdn,'C:\Documents and Settings\Administrator\桌面\qs\qs\qyym.dll'
了但我一加上
declare @yy int
exec @yy=master..csdn
select @yy
再执行的时候,就显示:
数据库中已存在名为 'cs' 的对象。
了,这个是怎么回事呢
[@dllname=]'dll'
USE master
EXEC sp_addextendedproc A, 'A.dll'
在库 C:\Documents and Settings\Administrator\桌面\qs\qs\qyym.dll 中找不到函数 csdn。原因: 127(找不到指定的程序。)。是不是要先将dll函数导出才行啊?
用vs08编译的dll,SQL怎么找呢?好像要先注册什么的,但我用regsvr32进行注册不了--"没有找到dllregisterserver输入点"
后来听说要 "要用 新添项目-->COM 类,然后:
使用.net的工具Command Prompt:
Regasm.exe xxx.dll(文件全路径) /tlb:xxx.tlb(输出全路径)
这样就可以正常调用了 "但还是不行,等高人指点!!!