 |
|
รบกวนเรื่อง database หน่อยค่ะ ต้องการวันนี้ ฟอร์มรับส่งข้อมูล Error Type: Microsoft JET Database Engine (0x80004005) Operation must use an updateable query |
|
 |
|
|
 |
 |
|
ลอง กำหนด permission ให้กับไฟล์ database โดยอนุญาตให้ Network Service, internet guest account มีสิทธิ์ในการอ่าน / เขียนครับ
|
 |
 |
 |
 |
Date :
13 ก.พ. 2550 11:29:47 |
By :
molecule |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
คือตอนทำที่บ้านทำไมเราทำผ่านค่ะ แล้ว coppy file มา
อยู่ดีๆๆ มันก็รันไม่ผ่านเฉยเลยอ่ะ
|
 |
 |
 |
 |
Date :
13 ก.พ. 2550 13:06:19 |
By :
am |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ที่บอกว่า กำหนด permission ให้กับไฟล์ database
ทำตรงไหนคะ เข้าไปยังไงอ่ะ
|
 |
 |
 |
 |
Date :
13 ก.พ. 2550 13:12:30 |
By :
am |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ทำตามนี้Click ขวา ที่ฐานข้อมูลของคุณ แล้ว เลือก Properties แล้วเลือก Security แล้วกด Add แล้วก็พิมพ์ คำว่า Everyone เข้าไปเลย แล้วมา ติ๊ก ในช่อง Allow เลือก หมดเลยนอกจาก Full Control
|
 |
 |
 |
 |
Date :
13 ก.พ. 2550 13:44:01 |
By :
AutoXAutoY |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ใช้ฐานข้อมูลเป็น access ค่ะ ทำตมแล้ว ไม่มีหัวข้อที่ว่าเลย
ทำงัยดีคะ
อีกอย่างทำไมเครื่องที่บ้ารันผ่าน แต่มา ที่ทำงานดันรันไม่ผ่าน
รบกวนแนะนำ ด้วยค่ะ
|
 |
 |
 |
 |
Date :
13 ก.พ. 2550 16:30:56 |
By :
am |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
เมื่อวานลองกลับไปทำที่บ้าน มันรันผ่านค่ะ
แต่พอก๊อปงานมาทำที่ทำงานมันกลับ ไม่ผ่านอีก ก็เลย งงค่ะ
ฐานข้อมูลตัวอื่นก็รันผ่านนะคะ
เลยไม่รู้ต้องทำยังไง
แนะนำหน่อยค่ะ
|
 |
 |
 |
 |
Date :
14 ก.พ. 2550 10:44:35 |
By :
am |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
แล้วที่ทำงานต้องเข้า ID ,pass เพื่อเข้ามาใช้งานใน Domain ในบริษิท หรือป่าวครับ
|
 |
 |
 |
 |
Date :
14 ก.พ. 2550 11:56:53 |
By :
AutoXAutoY |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
login.asp ตัวที่ 1
<!--#include file="connect.asp"-->
<%
domain="suvas"
username=request("username")
if request("submit")="Log in" then
On Error resume next
set pUser = GetObject("WinNT://" & domain & "/" & username)
if Not IsObject(pUser) then
session("errLogin")="e01" ''äÁ辺ª×èͼÙéãªé§Ò¹!!
'response.write session("errLogin")
else
pUser.ChangePassword request("password"), request("password")
if err.number = -2147024810 then
session("errLogin")="e02" 'ÃËÑʼèÒ¹äÁè¶Ù¡µéͧ!!
'response.write session("errLogin")
elseif err.number = -2147022651 then
sql="select calendar,username,password,pm,worker_name,worker_surname,worker_id from worker where username='" & username & "' and status='0'"
set rs=db.execute(sql)
if not (rs.eof=true and rs.bof = true) then 'Check user ã¹°Ò¹¢éÍÁÙÅ eCIC
session("full_name")=rs("worker_name") & " " & rs("worker_surname")
session("username")=rs("username")
session("worker_id")=rs("worker_id")
session("user_type")=rs("pm")
'session("calendar_type")=rs("calendar")
rs.close()
set rs=nothing
db.close
set db=nothing
response.write "<script>parent.location = ""index.asp""</script>"
else
session("errLogin")="e10" '·èÒ¹ÂѧäÁèÁÕÃÒª×èÍã¹ÃÒ¡ÒüÙéãªé§Ò¹â»Ãá¡ÃÁ ¡ÃسҵԴµèÍ [email protected]
rs.close()
set rs=nothing
db.close
set db=nothing
end if
end if
end if
else
if request("cancel")="Cancel" then
session("errLogin")=""
response.write "<script>parent.location = ""index.asp""</script>"
end if
end if
'********* ERROR DETIAL *********'
if session("errLogin")="e01" then
err_des=" äÁ辺ª×èͼÙéãªé§Ò¹!! "
elseif session("errLogin")="e02" then
err_des=" ÃËÑʼèÒ¹äÁè¶Ù¡µéͧ!! "
elseif session("errLogin")="e10" then
err_des=" ·èÒ¹ÂѧäÁèÁÕÃÒª×èÍã¹ÃÒ¡ÒüÙéãªé§Ò¹â»Ãá¡ÃÁ ¡ÃسҵԴµèÍ [email protected] "
end if
'********* ERROR DETIAL *********'
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
<meta http-equiv="Content-Language" content="th">
<title>New Page 1</title>
<LINK REL="stylesheet" HREF="stylesheet.css" TYPE="text/css">
</head>
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0">
<div align="center">
<p> </p>
<form action=login.asp method=post>
<table width="300" border="0" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" background="image/sbg2.gif">
<tr>
<td width="1" rowspan="8" bgcolor="#808080"><img border="0" src="image/blank.gif"></td>
<td colspan=2 bgcolor="#808080" height="1"><img border="0" src="image/blank.gif"></td>
<td rowspan="8" bgcolor="#808080" width="1"><img border="0" src="image/blank.gif"></td>
</tr>
<tr>
<td height="5" colspan=2 bgcolor="#00CCFF"><img border="0" src="image/blank.gif"></td>
</tr>
<tr>
<td width="120" align="right" bgcolor="#00CCFF" class="text-10"><span lang="en-us">
Username : </span> </td>
<td bgcolor="#00CCFF"> <input type="text" name="username" value="<%=request("username")%>" style="width:150px"></td>
</tr>
<tr>
<td width="120" align="right" bgcolor="#00CCFF" class="text-10"><span lang="en-us"> <font color="#000000">Password
:</font> </span> </td>
<td bgcolor="#00CCFF"> <input type="password" name="password" style="width:150px"></td>
</tr>
<tr>
<td height="5" colspan=2 bgcolor="#00CCFF"><img border="0" src="image/blank.gif"></td>
</tr>
<tr>
<td colspan=2 bgcolor="#00CCFF">
<p align="center">
<input type="submit" name="Submit" value="Log in" style="width:50px">
<input type="submit" name="Cancel" value="Cancel" style="width:50px">
</td>
</tr>
<tr>
<td height="5" colspan=2 bgcolor="#00CCFF"><img border="0" src="image/blank.gif"></td>
</tr>
<tr>
<td colspan=2 bgcolor="#808080" height="1"><img border="0" src="image/blank.gif"></td>
</tr>
<tr>
<td colspan=2></td>
</tr>
</table>
</form>
</div>
<p align="center"><font face="Microsoft Sans Serif" size="2" color="#FF0000">
<span><%=err_des%></span></font></p>
</body>
</html>
login_nopermission.asp ตัวที่ 2
<!--#include file="connect.asp"-->
<%
if request("submit")="Log in" then
username=request("username")
password=request("password")
sql="select calendar,username,password,pm,worker_name,worker_surname,worker_id from worker where username='" & username & "' and password='" & password & "' and status='0'"
set rs=db.execute(sql)
if not (rs.eof=true and rs.bof = true) then
session("full_name")=rs("worker_name") & " " & rs("worker_surname")
session("username")=rs("username")
session("worker_id")=rs("worker_id")
session("user_type")=rs("pm")
'session("calendar_type")=rs("calendar")
rs.close()
response.write "<script>parent.location = ""index.asp""</script>"
else
err=true
rs.close()
end if
set rs=nothing
db.close
set db =nothing
else
if request("cancel")="Cancel" then response.redirect "index.htm"
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta http-equiv="Content-Language" content="th">
<title>New Page 1</title>
<LINK REL="stylesheet" HREF="stylesheet.css" TYPE="text/css">
</head>
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0">
<div align="center">
<p> </p><p> </p>
<form action=login_nopermission.asp method=post>
<table border="0" width="300" cellspacing="0" cellpadding="0" background="image/sbg2.gif">
<tr>
<td width="1" rowspan="8" bgcolor="#808080"><img border="0" src="image/blank.gif"></td>
<td colspan=2 bgcolor="#808080" height="1"><img border="0" src="image/blank.gif"></td>
<td rowspan="8" bgcolor="#808080" width="1"><img border="0" src="image/blank.gif"></td>
</tr>
<tr>
<td height="5" colspan=2 bgcolor="#00CCFF"><img border="0" src="image/blank.gif"></td>
</tr>
<tr>
<td width="120" align="right" bgcolor="#00CCFF" class="text-10"><span lang="en-us">
Username : </span> </td>
<td bgcolor="#00CCFF"> <input type="text" name="username" value="<%=request("username")%>" style="width:150px"></td>
</tr>
<tr>
<td width="120" align="right" bgcolor="#00CCFF" class="text-10"><span lang="en-us">
<font color="#000000">Password :</font> </span> </td>
<td bgcolor="#00CCFF"> <input type="password" name="password" style="width:150px"></td>
</tr>
<tr>
<td height="5" colspan=2 bgcolor="#00CCFF"><img border="0" src="image/blank.gif"></td>
</tr>
<tr>
<td colspan=2 bgcolor="#00CCFF"> <p align="center">
<input type="submit" name="Submit" value="Log in" style="width:50px">
<input type="submit" name="Cancel" value="Cancel" style="width:50px">
</td>
</tr>
<tr>
<td height="5" colspan=2 bgcolor="#00CCFF"><img border="0" src="image/blank.gif"></td>
</tr>
<tr>
<td colspan=2 bgcolor="#808080" height="1"><img border="0" src="image/blank.gif"></td>
</tr>
</table>
</form>
</div>
</body>
</html>
ช่วยอธิบายหน่อยค่ะ ไม่รู้ว่าใช้วิธีการ login ยังไงค่ะ ตรวจสอบค่ายังไงช่วยอธิบายอย่างละเอียดหน่อยนะค่ะ ขอบคุณค่ะ
|
 |
 |
 |
 |
Date :
14 ก.พ. 2550 12:57:47 |
By :
v |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ที่ทำงานไม่ต้องใช้ login,pass ค่ะ
เคยเขียนมาครั้งนึงก็ผ่านปกติ
แต่พอมาเขียนอีกทีนึงก็เป็นอย่างที่บอกไปตอนต้น
พอตัวเองลองรันโปรกแกรมเดิมที่เคยๆเขียนไว้ ก็ผ่านค่ะ
แต่ว่าโปรแกรมนี้มันไม่ผ่าน
และโปรแกรมนี้ที่เขียนมา file ไหนที่ติดต่อฐานข้อมูลมันก็จะขึ้นประมาณนี้เลยค่ะ
เราก็เลย งง ว่าตกลงมันเป็นปัญหาที่ไหนกันแน่ รบกวนแนะนำด้วยนคะ
|
 |
 |
 |
 |
Date :
14 ก.พ. 2550 15:09:07 |
By :
am |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ยังไม่ผ่านเลยค่ะ
แนะนำหน่อย
ต้องส่งแล้วค่ะ
|
 |
 |
 |
 |
Date :
15 ก.พ. 2550 09:27:14 |
By :
am |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
สำหรับ OS ที่เป็น WINXP , 2003 Server นะครับ
หลังจาก ทำให้เว็บเป็น virtual directory แล้ว ก็ทำดังนี้ครับ
1. ไปที่ไฟล์ database access คลิกขวา ที่ไฟล์ เลือก Propoerties
2. ไปที่ tab Security ใน ช่อง Group or user names จะมีหลายกลุ่ม แต่จะต้องมีสามอันนี้
- IIS_WPG (machine name)
- Internet Guest Account
- NETWORK SERVICE
3. ถ้าไม่มี ก็เพิ่มเข้าไปด้วยการคลิกที่ปุ่ม Add มันจะมีหน้าต่างใหม่เด้งออกมา คลิก Advanced แล้วคลิกที่ปุ่ม Find Now จะมีรายการ Group / Username ก็เลือกเอาให้ได้ตามข้อ 2
4. พอเพิ่มแล้ว ก็คลิกที่ Group/ User name ที่เข้ามาใหม่ ให้สิทธิในการ Read & Execute / Read / Write
5. คลิก Apply & OK
|
 |
 |
 |
 |
Date :
16 ก.พ. 2550 13:14:10 |
By :
molecule |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ฟอร์มรับข้อมูล
<%
set Con = Server.Createobject("ADODB.Connection")
pathto=server.mappath("../new folder/big.mdb")
'conn.connectionstring ="Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\Inetpub\wwwroot\kiss\db1.mdb;Persist Security Info=False"
con.connectionstring ="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & pathto &";Persist Security
ลองเช็คดูคับว่า path มันตรงกันรึป่าว
|
 |
 |
 |
 |
Date :
16 ก.พ. 2550 14:02:56 |
By :
CrazyMania |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|