掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
RecordCountの戻り値が不正 (ID:141646)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
初めまして。早速ですが質問させて頂きます。 下記のようなソースを作成し、後の処理で取得件数による分岐を行いたいのですが、RecordCountを使うと取得できようが出来まいが「-1」しか返ってきません。使い方間違っているのでしょうか? ご教示いただけれ幸いです。宜しくお願いします。 Private Function selectProducts(Shakei As String, Shaban As String) As ADODB.Recordset Dim strSql As String strSql = " select * " & _ " from d_sharyo " If Shakei <> "" Then strSql = strSql & "where SHAKEI_KEY = '" & Shakei & "'" End If If Shaban <> "" Then strSql = strSql & " and SHABAN = '" & Shaban & "'" End If Set selectProducts = oraconn.Execute(strSql) MsgBox (selectProducts.RecordCount) End Function
←解決時は質問者本人がここをチェックしてください。
更新する
戻る
掲示板システム
Copyright 2021 Takeshi Okamoto All Rights Reserved.