不允许从数据类型varchar到二进制的隐式转换。使用CONVERT函数运行此查询。救命 [英] Implicit conversion from data type varchar to binary is not allowed. Use the CONVERT function to run this query. HELP
本文介绍了不允许从数据类型varchar到二进制的隐式转换。使用CONVERT函数运行此查询。救命的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我收到此错误..我不知道如何修复它。这是代码:
i get this error.. i dont know how to fix it . here is the code :
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/lib.asp"-->
<!--#include file="inc/md5.asp"-->
<!--#include file="inc/config.asp"-->
<%
if(request("action")="save") then
UserName = GetPostField("UserName")
oldpass = GetPostField("oldpass")
moldpass = GetPostField("moldpass")
ans = GetPostField("ans")
quest = GetPostField("quest")
email = GetPostField("email")
num = GetPostField("num")
qq = GetPostField("qq")
CheckCode = GetPostField("Checkcode")
checkzw(UserName)
If CheckCode=Empty Or Trim(Session("MuGetCode"))<>CheckCode Then
msg("ÄúÌîдµÄÑéÖ¤ÂëÓëϵͳ²úÉúµÄ²»Ò»Ö£¬ÇëÖØÐÂÊäÈë")
end if
if num="0" then msg("¶Ô²»Æð,Ö¤¼þºÅÂë±ØÐëΪÊý×Ö")
if(ChkInvaildWord(UserName) or ChkInvaildWord(email) or ChkInvaildWord(oldpass) or ChkInvaildWord(moldpass) or ChkInvaildWord(quest) or ChkInvaildWord(ans) or ChkInvaildWord(num) or ChkInvaildWord(qq) or ChkInvaildWord(ServerCode)) then
msg("Çë²»ÒªÊäÈë·Ç·¨×Ö·û")
end if
if oldpass <> moldpass then
msg("Á½´ÎÃÜÂë²»Ïàͬ")
end if
md5pass=md5(oldpass,32)
md5UserName=md5(UserName,32)
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "Select * from Accounts where AccountName='"&UserName&"'",conn
if Not rs.Eof then
rs.close
msg("¸ÃÓû§ÃûÒѾ±»×¢²á£¬ÇëʹÓÃÆäËûÓû§Ãû")
else
conn.execute("insert into Accounts (AccountName,AccountLevelCode,CharacterCreateLimit,CharacterMaxCount,RegisterDate,PublisherCode,Passphrase) values ('"&UserName&"','0','4','7','2014-01-20 12:12:12','4','"&md5pass&"') ")
rs.close
'×¢²áËͽðÇ®
set rs = nothing
set rs1 = nothing
msg "Cuenta Registrada con exito!."
End If
else
msg3("ÄãµÄIpÐÅÏ¢ÒѾ±»¼Ç¼£¬Çë²»Òª·Ç·¨Ìá½»")
end if
%>
推荐答案
insert into Accounts (AccountName,AccountLevelCode,CharacterCreateLimit,CharacterMaxCount,RegisterDate,PublisherCode,Passphrase) values ('"&UserName&"','0','4','7','2014-01-20 12:12:12','4','"&md5pass&"') ")
此错误在此查询中。
其中一个字段类型不正确。检查日期值和列类型。
The error is in this query.
One of these fields types is incorrect. Check the date value and column type.
这篇关于不允许从数据类型varchar到二进制的隐式转换。使用CONVERT函数运行此查询。救命的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文