回复:如何动态执行一个存储过程
sql_syntax = "1 execute dbo.HT_6_UP_Sale_Day_Report_Month;1 @StartDate = '" + string(ldt_StartDate) + "',@EndDate = '" + string(ldt_Enddate) + "',@StorageCode = '" + ls_StorageCode + "'"
presentation_str = "style(type=grid)"
Serversqlca.AutoCommit = false
dwsyntax_str = ServerSQLCA.SyntaxFromSQL(sql_syntax, &
presentation_str, ERRORS)
IF Len(ERRORS) > 0 THEN
SetPointer(Arrow!)
Serversqlca.AutoCommit = False
MessageBox("Caution", &
"SyntaxFromSQL caused these errors: " + ERRORS)
RETURN
END IF
dw_dw.Create( dwsyntax_str, ERRORS)
IF Len(ERRORS) > 0 THEN
SetPointer(Arrow!)
Serversqlca.AutoCommit = False
MessageBox("Caution", &
"Create cause these errors: " + ERRORS)
RETURN
END IF
Serversqlca.AutoCommit = False
dw_dw.settransobject(ServerSQLCA)
dw_dw.retrieve()
这个样子的算不算你要的东西?能动态获取,text的估计也只有256吧。反正可动态创建