sp DB update 질문입니다.

ka1963의 이미지

ASP 에서 DB UPDATE 하려하는데 요류가서 올립니다.
우선 코드 올릴테니 짤은거니 좀 보고 오류좀 찾아주세요.
밑에 코드에서 room = Request.Form("s_d") 이부분은 그전에 입력 받은것인데 TABLE 이름이면서 변수입니다.

[room.asp]

<head>
<%
    set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open ("DSN=movie")
    room = Request.Form("s_d")
 
SQLString = "Select b_seat,b_reservation From "& room & " order by b_seat"
 
Set Result = Conn.Execute(SQLString)
%>
</head>
<body bgcolor="white">
    <center>
        <font size="6"><%=room%> 좌석 현황 </font>
        <br>
        <br>
        <table width="*" cellpadding="5">
            <tr bgcolor="royalblue" align="center" height="10">
                <font color="white">
                    <td width="70">
                        <font color="white">좌석번호
                    </td>
                    <td width="100">
                        <font color="white">예약현황
                    </td>
                </font>
            </tr>
            <% Do while Not Result.EOF %>
            <tr height="14">
                <td align="center">
                    <%=Result("b_seat")%>
                </td>
                <td align="center">
                    <%=Result("b_reservation")%>
                </td>
            </tr>
            <% Result.MoveNext
Loop 
            %>
        </table>
        <br>
        <form action="update.asp" method="post">
        좌석번호 : <input type="text" name="s_S" size="10">
        <input type="submit" value="예약">
        </form>
        </center>
</body>

<%
Result.Close
Set Result = Nothing
Conn.Close
Set Conn = Nothing
%>

[update.asp]
<%
room = Request("room")
id = Request("memberid")
seat = Request.Form("s_S")

set Dbcon = Server.CreateObject("ADODB.Connection")
Dbcon.Open ("DSN=movie")

sql="Update "&room&" SET b_ID = '" &id&"', b_reservation = 'OCCUPIED' where b_seat= "& seat

Dbcon.Execute(sql)

url = "home.asp"
Dbcon.close
set Dbcon = Nothing

Response.Redirect url
%>

이렇게 코드짜고 위 그림 에서 빈좌석의 번호를 누르면 아래와 같은 오류가 떠요....

Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] FROM 절의 구문 오류입니다.
/room.asp, line 11

File attachments: 
첨부파일 크기
Image icon room.jpg1.3 MB

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.