609
社区成员
发帖
与我相关
我的任务
分享
CREATE PROCEDURE dbo.get_shortmsg
@mobile char(11),@msg varchar(140)
AS
begin
set nocount on
set rowcount 20
if (substring(@mobile,1,3)>='134' and substring(@mobile,1,3)<='139')
select * from shortmessage_bak
else if (substring(@mobile,1,3)>='130' and substring(@mobile,1,3)<='133')
select * from free_mobile
set rowcount 0
set nocount off
end
string ERRORS, sql_syntax
string presentation_str, dwsyntax_str
sql_syntax = "execute get_shortmsg '"+sle_1.text+"','第二个参数'"
presentation_str = "style(type=grid)"
dwsyntax_str = SQLCA.SyntaxFromSQL(sql_syntax, &
presentation_str, ERRORS)
IF Len(ERRORS) > 0 THEN
MessageBox("Caution", &
"SyntaxFromSQL caused these errors: " + ERRORS)
RETURN
END IF
dw_1.Create( dwsyntax_str, ERRORS)
IF Len(ERRORS) > 0 THEN
MessageBox("Caution", &
"Create cause these errors: " + ERRORS)
RETURN
END IF
dw_1.settransobject(sqlca)
dw_1.retrieve()