שגיאה בקוד ASP

avraham35

New member
שגיאה בקוד ASP

שלום רציתי לשאול מה הבעיה בקוד הבא
<HTML> <BODY> <% Set Upload = Server.CreateObject("Persits.Upload.1") Count = Upload.Save ("c:\upload") Dim conn, SQLstr Set conn = Server.CreateObject("ADODB.Connection") conn.Open "DATA" SQLstr="INSERT INTO PICTHER (PICTHER) VALUES ('" SQLstr = SQLstr & Request("PICTHER") & "')" conn.Close Set conn = Nothing %> Files:<BR> <% For Each File in Upload.Files Response.Write File.Name &"= "& File.Path &" ("& File.Size &" bytes)<BR>" Next %> </BODY> </HTML>​
שהוא נטותן לי הודעת שגיה שהיא:
The page cannot be displayed There is a problem with the page you are trying to reach and it cannot be displayed. -------------------------------------------------------------------------------- Please try the following: Click the Refresh button, or try again later. Open the localhost home page, and then look for links to the information you want. HTTP 500.100 - Internal Server Error - ASP error Internet Information Services -------------------------------------------------------------------------------- Technical Information (for support personnel) Error Type: Request object, ASP 0208 (0x80004005) Cannot use the generic Request collection after calling BinaryRead. /project1/UploadScript1.asp, line 11 Browser Type: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30) Page: POST 22594 bytes to /project1/UploadScript1.asp POST Data: error '80020009' Exception occurred. /iisHelp/common/500-100.asp, line 223​
הקוד בשורה 11 הוא:
SQLstr = SQLstr & Request("PICTHER") & "')"​
 

Xעמרי

New member
אתה שולח מידע בינארי

ומנסה לקרוא מידע שהגיע בPOST, אתה לא יכול לצורך העניין,אתה יכול לפנות לשדה שניסית לפנות אליו בצורה הבאה:
SQLstr = SQLstr & Upload.Form("PICTHER") & "')"​
 

avraham35

New member
שאלה נוספת

שיניתי את מה שאמרת לי רק רציתי לשאול מדוע עכשיו הנתונים אינם נשמרים לי באקסס אני רצה לשמור את המיקום של התמונה תודה
 

avraham35

New member
נ.ב

אייך אני עושה שהתמונה תשב במקום מסוים על המסך תודה
 

Xעמרי

New member
אין פה שמום שליחה לDB

אתה רק מכניס את השאילתא לתוך משתנה ולא עושה עם המשתנה הזה כלום, איך בדיוק אתה רוצה שזה יתבצע?
 

avraham35

New member
התמונה עוברת לתקיה מסוימת

רציתי לשאול אייך אני עושה שהיא תשב במקום מסוים במסך
 
למעלה