ASP VB.NET 客户端上传文件到服务器端
Dim strPath As String = Server.MapPath("~\文件夹")
'判断保存文件路径是否存在 不存在则创建
If Not Directory.Exists(strPath) Then
Directory.CreateDirectory(strPath)
End If
Dim PATH As String = Server.MapPath((FileUpload1.FileName))
'如果文件存在 则上传
If (FileUpload1.HasFile) Then
FileUpload1.PostedFile.SaveAs(PATH)
End If
'一:先把EXCEL导入dateView
'二:然后将dateView里的数据导入到数据库里面
'EXCEL 的连接串
Dim sConnectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" + PATH + ";" & _
"Extended Properties=Excel 8.0;"
'建立EXCEL的连接
Dim objConn As New OleDbConnection(sConnectionString)
objConn.Open()
Dim objCmdSelect As OleDbCommand = New OleDbCommand("SELECT
相关文档:
Sub CheckTextCodingType(Textfile)
Set fl = aqFile.OpenBinaryFile(Textfile, aqFile.faRead)
Binary1 = fl.ReadByte()
Binary2 = fl.ReadByte()
fl.Close
select case CStr(Binary1)& CStr(Binary2)
case 255254: '*Unicode (UTF-16) 前两个字节为FFFE
Log.Message("fi ......
在我开发BS结构程序中,由于经常需要在ORACLE中处理一些容量较大的文本数据,所以经过反复测试终于用ASP成功解
决了大文本数据在ORACLE下存取问题。
一、运行环境:
1、Microsoft Windows 2000 Server + IIS 5.0
2、Oracle8i中文标准版
二、建立数据表:
CREATE TABLE SYSTEM.TEST(
B ......
1. 在VB的Form设计时,加入一个picturebox控件,这个控件作为OLE容器,MapInfo中的地图将在该控件上显示。
2. 执行VB的函数Createobject(“MapInfo.Application”),启动MapInfo。这时MapInfo在后台启动,对用户来说不可见,不会弹出sp ......
Public Class Form1
Dim x As Integer
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
x = 1
Timer1.Interval = 1000
Timer1.Start()
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e ......