Microsoft VBScript 런타임 오류 error '800a000d'
형식이 일치하지 않습니다.: 'FormatCurrency'
/members/login.asp, line 106
이 밑에는 글은 해결 방법이었습니다만, 여전히 해결되지 않습니다... 조금 더 나은 방법 좀 알려 주세요... 소스에는 이상이 없는 것 같군요...
해당 Member 테이블을 봤더니 기본값을 0으로 들어있지않고 여전히 NULL로 들어있었습니다. 고객님께서 어떻게 해보셨다는 건지는 잘 모르겠지만... 현재 값을 0으로 바꿔놨더니 오류가 나지 않네요. 그리고 테이블 기본값으로 NULL이 아닌 0이 들어가도록 변경해 두었습니다.
<% str="Provider=SQLOLEDB.1;Data Source=localhost;Initial catalog=kimgeun_db;User Id=kimgeun;Password=kgykgy;" Set db = Server.CreateObject("ADODB.Connection") db.Open str
SQL="Select mem_rate,mem_name,mem_mileage From member" SQL=SQL & " Where mem_userid='" & Session("userid") & "'" Set rate = db.Execute(SQL) 'Response.Write rate("mem_mileage") %> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=euc-kr"> <title>Login</title> <script language="JavaScript" type="text/JavaScript"> <!-- function MM_openBrWindow(theURL,winName,features) { //v2.0 window.open(theURL,winName,features); } //--> </script> </head> <body leftmargin="0" marginwidth="0" marginheight="0"> <% If Session("userid") = "" Then '아직 로그인하지 않은 방문자라면 %> <table width="224" height="130" border="0" cellpadding="0" cellspacing="0"> <form name="login" action="/members/login_ok.asp" method="post"> <tr> <td height="25" colspan="4"> </td> </tr> <tr> <td width="50" height="30" align="right"><font color="#666666" size="2"><strong> ID</strong></font></td> <td width="10" height="30"> </td> <td width="164" height="30"><input name="userid" type="text" size="15" maxlength="12"></td> </tr> <tr valign="middle"> <td width="50" height="30" align="right"><font color="#666666" size="2"><strong>PW</strong></font></td> <td width="10" height="30"> </td> <td width="164" height="30"><input name="pwd" type="password" size="15" maxlength="12"></td> </tr> <tr> <td width="224" height="45" colspan="3" valign="middle"> <table width="224" height="45" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="17" height="35"> </td> <td width="88" height="35" valign="bottom"><font size="1"> <input name="image" type="image" src="/members/mem_img/login.jpg" width="78" height="24"> </font></td> <td width="99" height="35" valign="bottom"><a href="#"><img src="/members/mem_img/mem_join.jpg" width="78" height="24" border="0" onClick="MM_openBrWindow('/members/regist.asp','registry','width=637,height=617,top=85,left=310')"></a></td> <td width="20" height="35"> </td> </tr> </table> </td> </tr> </form> </table> <% Elseif rate("mem_rate") = 1 Then '로그인 아이디가 1(관리자급)이라면 %> <table width="224" height="130" border="0" cellpadding="0" cellspacing="0"> <tr> <td height="20" align="center"> </td> </tr> <tr> <td width="224" height="20" align="center"> <strong><font size="2" color="#999999"><%=rate("mem_name")%>님! Welcome !</font></strong> </td> </tr> <tr> <td width="224" height="25" align="center"> <font size="2">나의 마일리지 - <b> <font color="red" size="3"><%=Mid(FormatCurrency(rate("mem_mileage")),2)%> </font></b> </font> </td> </tr> <tr> <td height="20" align="center"><font size="2"><a href="/admin/adminpage.asp">관리자 페이지</a></font></td> </tr> <tr> <td width="224" height="20" align="center"><font size="2"><a href="/members/logoff.asp">로그오프</a> </font></td> </tr> <tr> <td width="224" height="20" align="center"><font size="2"><a href="#" onMouseOver="MM_openBrWindow('/members/mem_edit.asp','memedit','width=637,height=617,top=85,left=310')">회원정보수정</a> </font></td> </tr> </table> <% Else '로그인 아이디가 0(일반 회원)이라면 %> <table width="224" height="130" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="224" align="center"> </td> </tr> <tr> <td width="224" height="20" align="center"> <strong><font size="2" color="#999999"><%=rate("mem_name")%>님! Welcome !</font></strong> </td> </tr> <tr> <td width="224" height="25" align="center"> <font size="2">나의 마일리지는 <b> <font color="red" size="3"><%=Mid(FormatCurrency(rate("mem_mileage")),2)%></font> </b>점! </font> <font size="2"> </font> </td> </tr> <tr> <td width="224" align="center"><font size="2"><a href="/members/logoff.asp">로그오프</a></font></td> </tr> <tr> <td width="224" align="center"><font size="2"><a href="#" onClick="MM_openBrWindow('/members/mem_edit.asp','memedit','width=637,height=617,top=85,left=310')">회원정보수정</a> </font></td> </tr> <tr> <td width="224"></td> </tr> </table> <% End If rate.close Set rate = Nothing %> </body> </html>
|