Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

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


Ïà¹ØÎĵµ£º

[TestComplete ϵÁÐ]VB¼ì²é±àÂëÀàÐÍ

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 ......

VB ÃæÏò¶ÔÏó

Õ⼸ÌìÒ»Ö±ÔÚ×öÒ»¸öСµÄ¹¤³Ì,×öÒ»¸öÎı¾ÔĶÁÆ÷,ÏÖÔÚ×öµÄÒѾ­ÓÐÈý·ÖÖ®¶þÁË,´ÓÖÐѧϰµ½Á˺ܶà,¶ÔÎÒÃÇÒÔǰѧϰµÄ³É¹ûÓÐÁ˸üÉî¿ÌµÄÀí½â.
VBÊÇÒ»ÃÅÃæÏò¶ÔÏóµÄ³ÌÐòÉè¼Æ,ÎҾʹÓÃæÐÔ¶ÔÏóµÄ½Ç¶È¶ÔËû×öÒ»´Î×ܽá
°ÑVBÖÐËùÓеÄÊý¾Ý,±äÁ¿,¿Ø¼þ¶¼¿´×öÒ»¸ö¶ÔÏó
ÎÒÃÇËùÓеIJÙ×÷¶¼ÊǶԶÔÏóµÄ²Ù×÷,ÈöÔÏóÈ¥Ö´ÐÐijһ¸ö¹¦ÄÜ
´ó¼ÒÏÈ¿´Ò»¸öÀý× ......

ASP ÏÞÖÆ·¢Ìûʱ¼ä ºÍ µÇ½ÏÞÖÆ


н¨Á¢Ò»¸öASPÎļþ °Ñ ÒÔÏ´úÂë¸´ÖÆ½øÈ¥
<%
ip=request.ServerVariables("REMOTE_ADDR") '»ñÈ¡À´·ÃµÄIPµØÖ·
dim conn
set conn=server.CreateObject("ADODB.connection")
conn.open "Dbq="&server.MapPath("yb/dat/data.mdb")&";Driver={Microsoft Access Driver (*.mdb)}" '½¨Á¢Êý¾Ý¿âÁ¬½Ó ÕâÀïÄã¿ ......

ʹÓÃaspÁ¬½Óaccess2007×¢ÒâÊÂÏî

ǰ¼¸ÌìÔÚ×Ô¼ºµÄ±Ê¼Ç±¾Éϰ²×°ÁËOFFICE2007¡£½ñÌì×öÁËÒ»¸ö°Ù¶ÈÓÑÇéÁ´½Ó¼ì²éµÄ¹¤¾ß£¬ ÔÚÁ¬½ÓACCESS2007Êý¾Ý¿âµÄʱºò£¬Ê¹ÓõÄÇý¶¯´úÂëΪ£º"provider=microsoft.jet.oledb.4.0;data source="&server.mappath("queryrecord.mdb") ¡£È··¢ÏÖÌáʾ£º
Microsoft JET Database Engine ´íÎó ''80004005''
²»¿Éʶ±ðµÄÊý¾Ý¿â¸ñʽ
µ« ......

ASP VB.NET ÏÂÔØ·þÎñÆ÷Îļþµ½¿Í»§¶Ë


      Try
            Dim Path As String = Server.MapPath("~/Download/") 'Îļþ·¾¶
            Path = Path & "file.txt" 'ÎļþµÄÃû³Æ
     ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ