试试用下面连接字符串
"Provider=SQLOLEDB;Data Source=saipserver;Initial Catalog=banking; User ID=你的SQLSERVER帐号; Password=你的SQLSERVER密码"

解决方案 »

  1.   

    objCmd.ExecuteScalar返回的是你查询语句执行结果所影响的行数,
    从你的代码来看应该总为1吧.myReader["userid"].ToString()才是你的userid的值
      

  2.   

    建议用 XML !
    这个也是 .net1.1 中的例子.<Users>
        <Users>
            <UserEmail>[email protected]</UserEmail>
            <UserPassword>
                BA56E5E0366D003E98EA1C7F04ABF8FCB3753889
            </UserPassword>
        </Users>
        <Users>
            <UserEmail>[email protected]</UserEmail>
            <UserPassword>
                07B7F3EE06F278DB966BE960E7CBBD103DF30CA6
            </UserPassword>
        </Users>
    </Users>