1, use the adodc control code:
Adodc1. The ConnectionString=SQL_connstr
Adodc1. RecordSource="select distinct Station_Name from Station_Info"
Adodc1.Com mandType=adCmdText
Adodc1. Refresh
I=adodc1. You. Recordcount
At this point, I=1.
2, using rs variable code:
Set the rs=new adodb. You
Rs. Open the "select distinct Station_Name from Station_Info", SQL_conn, adOpenDynamic, adLockOptimistic, adCmdText
I=rs. Recordcount
At this point, I=1.
Can consult ace to explain why is such result, is to connect the same the same table in the database, query the same content,
CodePudding user response:
BBS in programming statements to answer you, you can go back to the programming BBS to see,