我使用VBscript从SQL服务器中选择了数据(I have selected data from SQL server using VBscript)
我正在尝试使用vb脚本从数据库中获取数据。我有如下代码:
<FORM action="" method="post"> <!--#include file="open_conn.asp" --> <% 'Get id dynamique from id unsubcribe mail id = Request.QueryString("ID_unsub") 'Selection phone number SQL = "SELECT telephone FROM KS_enfants WHERE IDenfant=1" Set Retel = Server.CreateObject("ADODB.RecordSet") Server.ScriptTimeout=120 Retel.Open SQL,session("mycon"),1,1 '======================= Read data and sent================= Do While NOT Retel.Eof tel = Retel("telephone") Loop %> <table cellpadding="0" cellspacing="0" style="padding:0; background:#fff;"> <tr> <td colspan="2" style="height:auto;"> <input type="text" name="txt_num" id="txt_num" style="width:250px;" value="<% tel %>" /> </td> </tr> </table>实际上,我收到了错误消息:
Erreur d'exécution Microsoft VBScript erreur '800a000d' Type incompatible: 'tel' /Emailing/template_email/emailing-apprenant/righ-side-1.asp, ligne 90我不知道如何修理它。任何人都知道,请帮帮我,谢谢。
I'm trying to get data from database using vb script.I have the code as below:
<FORM action="" method="post"> <!--#include file="open_conn.asp" --> <% 'Get id dynamique from id unsubcribe mail id = Request.QueryString("ID_unsub") 'Selection phone number SQL = "SELECT telephone FROM KS_enfants WHERE IDenfant=1" Set Retel = Server.CreateObject("ADODB.RecordSet") Server.ScriptTimeout=120 Retel.Open SQL,session("mycon"),1,1 '======================= Read data and sent================= Do While NOT Retel.Eof tel = Retel("telephone") Loop %> <table cellpadding="0" cellspacing="0" style="padding:0; background:#fff;"> <tr> <td colspan="2" style="height:auto;"> <input type="text" name="txt_num" id="txt_num" style="width:250px;" value="<% tel %>" /> </td> </tr> </table>In fact, I got the error messages:
Erreur d'exécution Microsoft VBScript erreur '800a000d' Type incompatible: 'tel' /Emailing/template_email/emailing-apprenant/righ-side-1.asp, ligne 90I do not know how to fix it.Anyone know, help me please, Thanks.
最满意答案
我想而不是:
<% tel %>你的意思是:
<%=tel %>要么
<% Response.Write(tel) %>I think instead of:
<% tel %>You meant:
<%=tel %>Or
<% Response.Write(tel) %>更多推荐
发布评论