| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 474 人关注过本帖
标题:可以读数据,但不能给session付值
只看楼主 加入收藏
glqzygl55
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2010-7-30
结帖率:0
收藏
已结贴  问题点数:20 回复次数:1 
可以读数据,但不能给session付值
想通过读卡器读入用户数据来登录,能读,但不能给给session付值,本人试过很多,就是不能取到session数据,诚恳各位看看怎么才能给session
asp语句如下
<html chaset="gb2312">

<object classid="clsid:379C0372-F5F0-4425-B47B-BE84B107D0AB" codebase="lzcard.cab#version=1,0,0,2"
    id="DC_OCX" width="0" height="0" align="center" hspace="0" vspace="0" visible="false">
    <param name="DoubleBuffered" value="0">
    <param name="Enabled" value="-1">
    <param name="Visible" value="-1">
</object>
<body>
    <form id="form1" method="post" action="login.asp"runat="server">
    <div>
        <table width="50%" class="table">
            <tr>
                <td width="228">
                    <img src="Logo.jpg" />                </td>
                <td colspan="3" class="style9">
                    D8读卡器OCX接口测试Demo                </td>
            </tr>
            <tr align="left">
                <td class="style3">
                    端口:                </td>
                <td colspan="2" class="style7"><select name="select" class="ComSelect" id="ComSelect">
                  <option>COM1</option>
                  <option>COM2</option>
                  <option>COM3</option>
                  <option>COM4</option>
                </select></td>
              <td width="846" align="center" class="style7"><input name="button" type="button" class="btnStyle" id="btnReadCard" onClick="ReadCard()" value="读卡" />                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
            </tr>
            <tr>
                <td class="style3">
                    卡号:                </td>
                <td colspan="3" align="left" class="style7">
                    <input id="txtCardNo" type="text" class="txtStyle" />                </td>
            </tr>
            <tr>
                <td class="style3">
                    渠道号:                </td>
                <td colspan="3" align="left" class="style7">
                    <input id="txtChannelNo" type="text" class="txtStyle" />                </td>
            </tr>
            <tr>
                <td class="style3">
                    机构代码:                </td>
                <td colspan="3" align="left" class="style7">
                    <input id="txtOrganNo" type="text" class="txtStyle" />                </td>
            </tr>
            <tr>
                <td class="style3">
                    用户代码:                </td>
                <td colspan="3" align="left" class="style7">
                    <input id="txtUserNo" type="text" class="txtStyle" />                </td>
            </tr>
            <tr>
                <td class="style3">
                    用户密码:                </td>
                <td colspan="3" align="left" class="style7">
                    <input id="txtUserPwd" type="text" class="txtStyle" />                </td>
            </tr>
            <tr>
                <td class="style3">
                    操作信息:                </td>
                <td colspan="3" align="left" class="style7">
                    <input id="txtErrMsg" type="text" class="txtStyle" />                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>

<script language="vbscript">

'读卡操作
  function ReadCard()
   Dim ErrMsg,CardNo,ChannelNo,OrganNo,UserNo,UserPWD,ComPort
   Dim iResult,vsales_channel,vsales_code
  
   ComPort =
   
   iResult =  DC_OCX.ReadCard(ComPort,CardNo,ChannelNo,OrganNo,UserNo,UserPWD,ErrMsg)
   
   if iResult = 0 then
     form1.txtCardNo.value = CardNo
     form1.txtChannelNo.Value =ChannelNo
     form1.txtOrganNo.value=OrganNo
     form1.txtUserNo.value=UserNo
     form1.txtUserPWD.value=UserPWD
     form1.test.value=UserPWD
session(cardno)=carno     --取不到数
   end if
   
   form1.txtErrMsg.value=ErrMsg
  end function
  
</script>
搜索更多相关主题的帖子: session 数据 
2010-07-30 16:52
gupiao175
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:40
帖 子:1787
专家分:7527
注 册:2007-6-27
收藏
得分:20 
iResult =  DC_OCX.ReadCard(ComPort,CardNo,ChannelNo,OrganNo,UserNo,UserPWD,ErrMsg)
iResult,这个才是卡号吧。
DC_OCX这个是什么组件,不太清楚,clsid:379C0372-F5F0-4425-B47B-BE84B107D0AB!

Q:1428196631,百度:开发地 即可找到我,有事请留言!
2010-07-30 17:32
快速回复:可以读数据,但不能给session付值
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.017556 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved