일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
- MSSQL보안
- JavaScript
- array
- asp함수
- javascript 한글입력체크
- ERD
- update
- 이미지세로길이
- 자바기초
- 인젝션
- sql순위
- WML
- VarType
- join
- XML
- sql업데이트
- 한글입력체크
- FileSystemObject
- xmldom
- SPLIT
- jdbc driver
- injection
- 정규식
- sql랭킹
- tempDB
- VARIABLE
- 이미지가로길이
- instr
- inner join
- wap
- Today
- Total
목록플밍_ASP (78)
3초기억력
img_url = "http://~~~경로" Set xh = CreateObject("MSXML2.ServerXMLHTTP") xh.Open "GET", img_url, false xh.Send() imgData = xh.ResponseBody Set xh = Nothing Set stm =CreateObject("ADODB.Stream") stm.open() stm.type=1 stm.write imgData stm.SaveToFile 저장경로&저장할이름, 2 stm.close() Set stm = Nothing%>
Function SaveBinaryData(FileName, ByteArray) Const adTypeBinary = 1 Const adSaveCreateOverWrite = 2 'Create Stream object Dim BinaryStream Set BinaryStream = CreateObject("ADODB.Stream") 'Specify stream type - we want To save binary data. BinaryStream.Type = adTypeBinary 'Open the stream And write binary data To the object BinaryStream.Open BinaryStream.Write ByteArray 'Save binary data To disk ..
대부분의 ASP 개발자들은 FSO(File System Object)를 이용하여 파일 시스템 핸들링 하는 방법에 대해 어느 정도 알고 있다. 하지만 FSO를 이용하여서는 바이너리 데이터가 들어 있는 파일을 읽고 표시하기는 어렵다. ASP는 매크로가 들어 있는 엑셀 파일이나, PDF 파일, 이미지 파일 등 바이너리 데이터가 들어 있는 파일을 다루기 위한 방법을 지원하지 않고 있다. 하지만 비주얼 베이직을 이용하여 이 부분을 보완할 만한 컴포넌트를 직접 작성할 수 가 있다. 여기서 다룰 내용을 직접 해보고자 한다면 비주얼 베이직 5.0 이상이 필요하다. 이제부터 바이너리 데이터가 들어 있는 파일을 읽어들이는 MyObject라는 ActiveX DLL을 비주얼 베이직을 통해 직접 만들어 보도록 하자. 우선 비주..
Set BinaryStream = CreateObject("ADODB.Stream")set fs = Server.CreateObject("Scripting.FileSystemObject")Set Fil = fs.GetFile("E:\file_upload\1.jpg") '절대경로BinaryStream.Type = 1BinaryStream.OpenBinaryStream.LoadFromFile Fil.pathDim iConst BlockSize = 1000For i = 1 To BinaryStream.Size Step BlockSize Response.BinaryWrite BinaryStream.Read(BlockSize)Next'if Not BinaryStream.EOS Then Response.Binar..
Function getStringBetween(str, sstart, send) PosStart = InStr(str, sstart) str_temp = Mid(str, PosStart, Len(str)) PosEnd = InStr(str_temp, send) + PosStart - 1 If (PosStart > 0) And (PosEnd > 0) Then getStringBetween = Mid(str, PosStart+Len(sstart), PosEnd-PosStart-Len(sstart)) Else getStringBetween = "" End If End Function 예, text = "kkkkkkkkkkkkkkktttttttttttttttttt안녕하세요" 일때, 사이의 것 뽑기 : getSt..
ASP TimeOut Error(408 Error) 1. ASP 스크립트 타임아웃 Option Explicit 상위에 선언하면 안됩니다. 하단에 Server.ScriptTimeOut = 600 (90초 Default) 2. DB 명령 수행시 타임아웃 연결시간초과, 수행시간초과 등으로 ASP페이지 실행이 종료됩니다. 명령수행시간 초과인 경우 DB를 오픈 하기 전에 DB.CommandTimeOut = 180 (30초 Default) 3. IIS 메타베이스 편집(IIS 속성에서도 수정 가능) a. IIS6.0 콘솔에서 컴퓨터이름에서 속성 - 메타베이스 직접 편집 허용 체크합니다. b. %SystemRoot%\system32\Inetsrv\Metabase.xml 을 메모장등으로 엽니다. c. AspBufferi..
ADO Data Types The table below shows the ADO Data Type mapping between Access, SQL Server, and Oracle: DataType Enum Value Access SQLServer Oracle adBigInt 20 BigInt (SQL Server 2000 +) adBinary 128 Binary TimeStamp Raw * adBoolean 11 YesNo Bit adChar 129 Char Char adCurrency 6 Currency Money SmallMoney adDate 7 Date DateTime adDBTimeStamp 135 DateTime (Access 97 (ODBC)) DateTime SmallDateTime D..
Function GetPageList(ByVal CurPage, ByVal PageCount, ByVal PageScale, ByVal Parametter, ByVal DesignType) Dim Path, PrevPage, NextPage, LastPage, FirstPage, PageStr Dim FirstImg, NextImg, LastImg, PrevImg Dim FromPage, ToPage, i Select Case DesignType Case "Text" FirstImg = "◀◀" PrevImg = "◀" NextImg = "▶" LastImg = "▶▶" Case Else FirstImg = "" PrevImg = "" NextImg = "" LastImg = "" End Select '..
Function IsInjectionParam() Dim QueryString QueryString = LCase(Request.ServerVariables("QUERY_STRING")) IsInjectionParam = False If InStr(QueryString, "execute") > 0 Or InStr(QueryString, "xp_") > 0 Or InStr(QueryString, "sp_") > 0 Then IsInjectionParam = True Exit Function End If If (InStr(QueryString, "select") > 0 And InStr(QueryString, "from") > 0) Or (InStr(QueryString, "update") > 0 And I..
0 Then retVal = retVal + 1 End If GetPageCount = CLng(retVal) End Function '/* 페이지 네비게이션을 뿌려주는 함수 */ Public Function ShowPageBar(ByVal pCurPage, ByVal pPreImg, ByVal pNextImg, ByVal param) Dim nPREV Dim nCUR Dim nNEXT Dim i Dim nPageCount Dim retVal Dim strLink Dim pageKubun If pCurPage = "" or isNull(pCurPage) Then pCurPage = 1 nPageCount = GetPageCount(G_TOTAL_RECORD) If pPreImg = "" Then pPre..