עבור לתוכן
View in the app

A better way to browse. Learn more.

HWzone

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

בעיה בחיבור מסד נתונים ב-ASP ובעיה נוספת בASP

Featured Replies

פורסם

הקוד אמור להוסיף את הנתונים מטופס ההרשמה אל מסד הנתונים. אך הנתונים אינם מתווספים. לא מצאתי בעיה בחיבור או בהפעלה עצמה. אני מריץ VISTA ULTIMATE (IIS7). כמובן במחשבים בביה"ס זה דווקא כן פעל - על XP PRO (IIS6). הרצתי גם על פיירפוקס וגם על IE8 וזה לא פעל.

הבעיה הראשונה היא שבפיירפוקס אחרי שאני מגיש את הטופס מופיעה לי שגיאה בלי נתוני שגיאה רק הפנייה לאתר אחר המסביר על IIS7. ושאני מריץ בIE8 לא מראה לי בכלל את הקובץ ASP ולא כלום.

הבעיה השניה שהנתונים אינם מתווספים למסד נתונים.

הנה הקוד של הHTML:

[pre]

<html dir="rtl">
<head>
<title>טופס הרשמה</title>
</head>
<body>
<form name="AddUserForm" action="[url]http://127.0.0.1/Website_Project/ASP/AddUserForm.asp"[/url] method="post">
<h1 align="center">טופס הרשמה</h1>
<table align="center" border="0" cellspacing="20%">
<tr>
<td>
שם משתמש
</td>
<td>
<input name="Uname" type="text" />
</td>
</tr>
<tr>
<td>
סיסמה
</td>
<td>
<input name="xPassword" type="password" />
</td>
</tr>
<tr>
<td>
תעודת זהות
</td>
<td>
<input name="ID" type="text" />
</td>
</tr>
<tr>
<td>
שם פרטי
</td>
<td>
<input name="Fname" type="text" />
</td>
</tr>
<tr>
<td>
שם משפחה
</td>
<td>
<input name="Lname" type="text" />
</td>
</tr>
<tr>
<td>
טלפון
</td>
<td>
<input name="Phone" type="text" />
</td>
</tr>
<tr>
<td>
כתובת
</td>
<td>
<input name="Address" type="text" />
</td>
</tr>
<tr>
<td>
<tr>
<td>
סוג כרטיס אשראי
</td>
<td>
<input name="CCtype" type="text" />
</td>
</tr>
<tr>
<td>
מספר כרטיס אשראי
</td>
<td>
<input name="CCnumber" type="password" />
</td>
</tr>
<td>
<input type="reset" />
</td>
<td>
<input type="submit" />
</td>
</tr>
</table>
</form>
</body>
</html>

[/pre]

והנה הקוד של הASP:


<head>
<title>
טופס הרשמה
<title>
</head>
<body>
<%
if not (IsEmpty(request.Form("Uname"))) then
Set connection=Server.CreateObject("ADODB.Connection")
stconnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &Server.MapPath("/Website_Project/Database/Customers.mdb")
connection.open stconnection

Uname=request.Form("Uname")
xPassword=request.Form("xPassword")
ID=request.Form("ID")
Fname=request.Form("Fname")
Lname=request.Form("Lname")
Phone=request.Form("Phone")
Address=request.Form("Address")
CCtype=request.Form("CCtype")
CCnumber=request.Form("CCnumber")

SQLstring="Insert into Customers values('"&Uname&"','"&xPassword&"',"&ID&",'"&Fname&"','"&Lname&"','"&Phone&"','"&Address&"','"&CCtype&"','"&CCnumber&"')"

connection.Execute(SQLstring)
connection.Close
Set connection=nothing
End if
%>
תודה לך. פרטיך נרשמו בהצלחה.
</br>
</br>
<button onclick="document.location='/Website_Project/HTML/AddUserForm.html';">חזרה לטופס</button>
</body>
</html>
<html dir="rtl">

ארכיון

דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.

דיונים חדשים

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.