将querystring值传递给selectcommand,然后将该命令的另一个值传递给另一个query2

时间:2019-04-16 05:16:54

标签: asp.net

我有一个使用查询字符串值作为参数来运行SQL query1的asp应用程序。该查询的结果将用于运行query2。

如何将来自query1的值传递给ASP中的query2?

编辑:这两个表来自具有不同连接设置的不同数据库。

class LoginViewController: UIViewController {

    var ref : DatabaseReference!

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view.
    }

    @IBAction func MSLoginTapped(_ sender: UIButton) {
        let provider = OAuthProvider(providerID: "microsoft.com")
        provider.getCredentialWith(nil) { (credential, error) in
            if error != nil {
                // Handle error.
                print("Failed to retreive credential.")
                return
            }
            if credential != nil {
                Auth.auth().signInAndRetrieveData(with: credential!) { authResult, error in
                    if error != nil {
                        // Handle error.
                    }
                    // User is signed in.
                    // IdP data available in authResult.additionalUserInfo.profile.
                    // OAuth access token can also be retrieved:
                    // credential.accessToken
                }
            } else {
                print("Credential is nil.")
            }
        }
    }
}
URL: www.website.com?ref=WO123
SQLQuery1: SELECT [valueA],[valueB] FROM TABLE1 WHERE [valueA] = WO123
SQLQuery2: SELECT [infoA],[infoB],[infoC] from TABLE2 WHERE [infoA] =  [valueB]
asp
PWiseGIS.SelectCommand = string.Format(sqldb, SQLQuery1);

0 个答案:

没有答案