Tag: sqlanywhere

如何在rails上的ruby中调用存储过程?

我是ROR的新手。 我想在单击VIEW中的提交按钮时调用存储过程进行处理。 Model: ——- class Pro::DataImport < ActiveRecord::Base attr_accessible :file_name, :process_name, :updated_by, :validates end Controller: —————– class Pro::DataImportsController < ApplicationController before_filter :authenticate_user! layout "layouts/enr/energy_master" def index @pro_data_imports = Pro::DataImport.all end def new @pro_data_import = Pro::DataImport.new end end View ———- Browse the file to upload: Stored Proc ————— ALTER PROCEDURE “DBA”.”my_enr_test”(file_name long varchar) BEGIN INSERT INTO […]