Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
Old 12-23-2003, 03:40 PM Teach Me......~~~
sys
sys's Avatar
Novice Talker

Posts: 8
Location: Malaysia
Trades: 0
customer.asp

<html>
<body>
<form method="post" action="add.asp">
<table>
<tr>
<td>CustomerID:</td>
<td><input name="custid" size="20"></td>
</tr><tr>
<td>Company Name:</td>
<td><input name="compname" size="20"></td>
</tr><tr>
<td>Contact Name:</td>
<td><input name="contname" size="20"></td>
</tr><tr>
<td>Address:</td>
<td><input name="address" size="20"></td>
</tr><tr>
<td>City:</td>
<td><input name="city" size="20"></td>
</tr><tr>
<td>Postal Code:</td>
<td><input name="postcode" size="20"></td>
</tr><tr>
<td>Country:</td>
<td><input name="country" size="20"></td>
</tr>
</table>
<br /><br />
<input type="submit" value="Add New">
<input type="reset" value="Cancel">
</form>
</body>
</html>




add.asp

<html>
<body>
<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "C:\webshare\northwind.mdb"
sql="INSERT INTO customers (customerID,companyname,"
sql=sql & "contactname,address,city,postalcode,country)"
sql=sql & " VALUES "
sql=sql & "('" & Request.Form("custid") & "',"
sql=sql & "'" & Request.Form("compname") & "',"
sql=sql & "'" & Request.Form("contname") & "',"
sql=sql & "'" & Request.Form("address") & "',"
sql=sql & "'" & Request.Form("city") & "',"
sql=sql & "'" & Request.Form("postcode") & "',"
sql=sql & "'" & Request.Form("country") & "')"
on error resume next
conn.Execute sql,recaffected
if err<>0 then
Response.Write("No update permissions!")
else
Response.Write("<h3>" & recaffected & " record added</h3>")
end if
conn.close
%>
</body>
</html>





why cannot add the data to my database which my database's name northwind?
it come out "no update permision"

and how to add data to database?with asp and ms accesss...
__________________
Thanks for ur guiding.....:):):)
sys is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-25-2003, 05:35 AM
Ultra Talker

Posts: 377
Trades: 0
Hmmm... I'm not a guru in ASP... Isn't northwind a tutorial database??? Maybe this is a problem....
__________________
andrews_john

Please login or register to view this content. Registration is FREE
andrews_john is offline
Reply With Quote
View Public Profile Visit andrews_john's homepage!
 
Old 12-25-2003, 08:51 PM
EvilHaider's Avatar
Skilled Talker

Posts: 56
Trades: 0
If it says no update permission I'd have to take a guess and say check the permissions on your mdb file. Are you doing this on your own local server with IIS installed or on a remote server? If it's local, just go to the folder w/ the mdb file and right click and find the properties option. Then find the permissions and allow everyone rights to read and write to the file. I think that should do it.
__________________

Please login or register to view this content. Registration is FREE

http://www.tutorialmaniacs.com
EvilHaider is offline
Reply With Quote
View Public Profile
 
Old 01-17-2004, 04:10 PM
Arfan's Avatar
Ultra Talker

Posts: 280
Trades: 0
basic of asp reditecting is here

<%
if Request.Form("select")<>"" then
Response.Redirect(Request.Form("select"))
end if
%>

<html>
<body>

<form action="demo_redirect.asp" method="post">

<input type="radio" name="select"
value="demo_server.asp">
Server Example<br>

<input type="radio" name="select"
value="demo_text.asp">
Text Example<br><br>
<input type="submit" value="Go!">

</form>

</body>
</html>
__________________

Please login or register to view this content. Registration is FREE


For all your Flash work email me on

Please login or register to view this content. Registration is FREE
Arfan is offline
Reply With Quote
View Public Profile
 
Old 01-17-2004, 04:13 PM
Arfan's Avatar
Ultra Talker

Posts: 280
Trades: 0
i took that out from

http://www.w3schools.com/asp/default.asp

baisc lesson on asp
it does other likes html xml asp xhtml htmlv1.2
__________________

Please login or register to view this content. Registration is FREE


For all your Flash work email me on

Please login or register to view this content. Registration is FREE
Arfan is offline
Reply With Quote
View Public Profile
 
Old 01-17-2004, 04:15 PM
Arfan's Avatar
Ultra Talker

Posts: 280
Trades: 0
Go here to see how it works properly


http://www.w3schools.com/asp/showasp...=demo_redirect
__________________

Please login or register to view this content. Registration is FREE


For all your Flash work email me on

Please login or register to view this content. Registration is FREE
Arfan is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Teach Me......~~~
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.17510 seconds with 12 queries