fat32 磁盘分区,iis 5.0 ,xp 专业版
出错提示:
异常详细信息: System.Data.OleDb.OleDbException: INSERT INTO 语句的语法错误。
<%@ Page Language="VB" Debug="true" %>
<%@ import Namespace="system.data" %>
<%@ import Namespace="system.data.oledb" %>
<script runat="server">
    Sub Button1_Click(sender As Object, e As EventArgs)
    dim dsn as string
    dsn="provider=microsoft.jet.oledb.4.0;data source=" & server.mappath("../database/db.mdb"

 & ";"
    dim conn as oledbconnection=new oledbconnection(dsn)
    conn.open
    dim strsql as string
    dim username,password,email as string
    username=request.form("username"

    password=request.form("password"

    email=request.form("email"

    strsql="insert into info(username,password,email) values('wang','262','wyongping@163.com')"
    'strsql="insert into userinfo(username,password,email) values('"& username &"','"& password &"','"& email &"')"
    dim cmd as oledbcommand=new oledbcommand(strsql,conn)
    dim result_int as integer
    cmd.executenonquery()
    if result_int>=1 then
    response.write("ok!"

    else
    response.write("error!"

    end if
    End Sub
</script>
<html>
<head>
</head>
<body>
    <form runat="server">
        <table height="150" width="300">
            <tbody>
                <tr>
                    <td>
                        用户:</td>
                    <td>
                        <asp:TextBox id="username" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        密码:</td>
                    <td>
                        <asp:TextBox id="password" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        电邮:</td>
                    <td>
                        <asp:TextBox id="email" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <asp:Button id="Button1" onclick="Button1_Click" runat="server" Text="提交"></asp:Button>
                    </td>
                </tr>
            </tbody>
        </table>
    </form>
</body>
</html>