我使用vc+odbc对sql server数据库进行操作,需要调用存储过程,有人说要使用命令行command,我想问一下如何创建命令行command.希望大虾结合如下一个小例子来讲解,这样便于理解。
有一个表table ,三个字段name, sex, age.
建立存储过程======计算表中有多少个男的。
create proc aa @i int output
as
select count(*) as i from table where sex='男'
go
在vc中
cdatabase db;
db.Open(数据源);
请问如何继续下去。
多谢。
有一个表table ,三个字段name, sex, age.
建立存储过程======计算表中有多少个男的。
create proc aa @i int output
as
select count(*) as i from table where sex='男'
go
在vc中
cdatabase db;
db.Open(数据源);
请问如何继续下去。
多谢。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货