使用html的上传<INPUT id="FileUp" runat="server" type="file"〉
解决方案 »
- 很认真很急迫地讨论一个GridView+DropDownList的问题
- 苦苦寻找:在一个控件上能用鼠标拉一个框,框能用鼠标拉大或拉小或移动,框里能显示动画图片或文字等内容
- ChangePassword发送邮件 出现乱码
- 非根目录下页面使用ajaxpro方法问题?? 急!!!
- asp的数据库连接
- 高分求一对我而言高难度sql语句!!!
- 请问各位高人,我想把两个音频文件组合成一个文件,该怎么办呀?
- 100分再问一个一直没有解决的问题:如何获得用户退出的事件(包括刷新和向前向后按扭),谢谢各位大师
- 刚装完.net Framework,运行下载的动网新闻,出现如下问题,怎么回事呢?
- 请问怎么样才能读取到客户端的值?
- 请教高手,如何在自定义类库中使用request?!?
- 大家好,怎样比较两份.NET程序的源代码是否一致?
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim conn As New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Database Password=;Data Source=c:\inetpub\wwwroot\tax\SwCx.mdb;Mode=ReadWrite|Share Deny None;Persist Security Info=False")
Dim comm As New OleDb.OleDbCommand
comm.Connection = conn
txtNr.Text = Replace(txtNr.Text, "<br/>", vbCrLf)
comm.CommandText = "insert into fg (dw,wh,bt,lr) values ('" & txtDw.Text & "','" & txtWh.Text & "','" & txtBt.Text & "','" & txtNr.Text & "')"
conn.Open()
comm.ExecuteNonQuery()
Response.Write("<script>alert('文档添加完成')</script>")
end sub
再将文件添加到数据库:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim conn As New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Database Password=;Data Source=c:\inetpub\wwwroot\tax\SwCx.mdb;Mode=ReadWrite|Share Deny None;Persist Security Info=False")
Dim comm As New OleDb.OleDbCommand
comm.Connection = conn
txtNr.Text = Replace(txtNr.Text, "<br/>", vbCrLf)
comm.CommandText = "insert into fg (dw,wh,bt,lr) values ('" & txtDw.Text & "','" & txtWh.Text & "','" & txtBt.Text & "','" & txtNr.Text & "')"
conn.Open()
comm.ExecuteNonQuery()
Response.Write("<script>alert('文档添加完成')</script>")
end sub