在delphi中如何调用啊!
解决方案 »
- access能否存取声音文件???
- Delphi中用ado带密码的access压缩代码!!
- 怎样把自己的应用程序加入到右键菜单中??????????????
- 高分求助!500
- 请问哪里有可以具有“自动完成输入”功能的输入框的控件?
- 怎样做这样格式的报表?
- Delphi用ClientDataSet自定义字段后写不了值
- fastreport高手请进 lemono((前前)) 请进,关于fastreport for DElphi6,在线等待1小时
- 用程序实现:用windows默认的打开方式打开一个文件(如exe, zip, doc等)?
- 怎样通过串口采集从测试仪传来的数据,用到Delphi的哪方面知识?
- 运用oleauto时碰见的基础问题
- 关于一个类似于dbgird控件的问题
create function getpower(@workerno varchar(4),@menuid varchar(10))
returns int as
begin
return 1;
end
--创建存储过程
create proc getnewticketno(@newticketno varchar(20) output)
as
begin
set @newticketno = 'fdsafdsa'
end--创建视图
create view v1 as select 1 as id
begin
adodataset1.Close;
adodataset1.CommandText:='select dbo.getpower(''1'',''2'') as p';
adodataset1.Open;
if not adodataset1.IsEmpty then
begin
showmessage(inttostr(adodataset1.FieldByName('p').AsInteger));
end;adocommand1.CommandType:= cmdStoredProc;
adocommand1.CommandText:='getnewticketno';
adocommand1.Parameters.CreateParameter('@newticketno',ftstring,pdoutput,4,'');
adocommand1.Execute;
showmessage(adocommand1.Parameters[0].Value);
adodataset1.close;
adodataset1.commandtext:='select * from v1';
adodataset1.open;你还是看看数据库方面的知识吧,了解一下概念
触发器是自动执行的, 没得调用。
存储过程可用TADOStoredProc调用,或者用sql直接调用 Sql.Add('exec 过程名 参数'); ExecSql;