delphi 如何获取存储过程取得的数据集
我在SQLServer数据库中写了一个存储过程,代码如下:ifexists(Select1Fromsysobjectswherename=('ImportData')an...
我在SQL Server数据库中写了一个存储过程,代码如下:
if exists (Select 1 From sysobjects where name= ('ImportData') and type ='P')
drop procedure ImportData
go
Create procedure ImportData
as
begin
if not (select object_id('Tempdb..#tableName')) is null drop table #TableName
Create table #tableName(
Tablename varchar (30),
[check] bit);
INSERT INTO #tableName (TableName, [check])
SELECT Name,0 as [check] from HDPCB..sysObjects where xType='U' and status >0
select *from #tableName
end;
go
ADOquery的属性设置如下
commandtext exec importdata
当我把ADOQuery 的Action属性设置为true 时,delphi给出错误提示
commandtext does not return a result set
请问我该如何获取存储过程查询得到的数据集???
HDPCB..sysObjects 里的点不多 展开
if exists (Select 1 From sysobjects where name= ('ImportData') and type ='P')
drop procedure ImportData
go
Create procedure ImportData
as
begin
if not (select object_id('Tempdb..#tableName')) is null drop table #TableName
Create table #tableName(
Tablename varchar (30),
[check] bit);
INSERT INTO #tableName (TableName, [check])
SELECT Name,0 as [check] from HDPCB..sysObjects where xType='U' and status >0
select *from #tableName
end;
go
ADOquery的属性设置如下
commandtext exec importdata
当我把ADOQuery 的Action属性设置为true 时,delphi给出错误提示
commandtext does not return a result set
请问我该如何获取存储过程查询得到的数据集???
HDPCB..sysObjects 里的点不多 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询