Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access_asp thread: updating a database


Message #1 by "Peter Colley" <004006934@c...> on Mon, 15 Apr 2002 11:10:12
Hi,
I am having trouble updating a databse that contains an AutoNumber field. 
In other words, I don't know how to do it! The database also contains a 
Checkbox field, which again I don't know how to update.
Can anyone help me!!
Thanks
Message #2 by "Ken Schaefer" <ken@a...> on Tue, 16 Apr 2002 19:37:29 +1000
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Peter Colley" <004006934@c...>
Subject: [access_asp] updating a database


: I am having trouble updating a databse that contains an AutoNumber field.
: In other words, I don't know how to do it! The database also contains a
: Checkbox field, which again I don't know how to update.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

>> The error is on line 8
>>
> How do you know? I didn't post any code.
>

Exactly

Cheers
Ken


Message #3 by "Chirag Solanki" <minddefault@h...> on Mon, 22 Apr 2002 14:49:12
> 

Hi there,
Im Chix from London and i need your help.  I read ur an expert in ASP.  
Im doing a project at the moment using Dreamweaver, ASP and MS Access.  
Im only a beginner. My project is about a jewellry shop that offers 
products, ive done the different asp pages i.e, watches, rings, 
bracelets, and pendants. Now on my web page i wana do a top ten list 
which shows the most popular products that people have searched.

Dont even know where to start, can u help???

Thanks alot

Chix



I>  would call a javascript function to take all the values collected and 
p> ut them in a hidden text box.  Then call the next page, perhaps a 
blank 
a> sp page with pure vb code and update the database.   

> Sample Script File
<> Script Language=Javascript>
<> !--
f> unction CheckHidden(ActionStr){ //V1.0 by Kirker 3-30-2002
	> if (ActionStr == ""){
	> alert("You must select a record to edit or delete")
	> return false;
}> 
	> return true;
}> 	

> function EditUserID(javaUserName){ //V1.0 by Kirker 3-30-2002
	> document.frmUserAdmin.txtID.value = javaUserName
	> document.frmUserAdmin.txtAction.value = "EDIT"
	> document.frmUserAdmin.txtSelection.value = javaUserName + " - 
has 
b> een selected for Edit or Delete"
	> 
}>  
-> ->
<> /Script>

> Here's the final java call before processing
<> FORM ACTION="user.asp" Name="frmUserAdmin" METHOD="post" 
onSubmit="return 
C> heckHidden(this.txtAction.value);">

> 
H> ere's a sample select button that calls a javascript in your 
<body></body>

> <SELECT id=select1 style="WIDTH: 311px; HEIGHT: 265px" size=2 
name=select1 
o> nclick=EditUserID(select1.value)>

> 
H> ere's a hidden box.  I use them to transfer info from java to vb and 
back

> <Input=hidden name=txtaction, value="">

> In the next form adduser.asp

> Option Explicit
D> im sUserID
D> im Action

> Action = request.form("txtAction")
s> UserID=request.form("txtUserID")

> function writenewdata(sUserID, stextboxinfo)
'> write your data
E> nd Function

> You could have a hidden textarea box and copy the contents from the 
real 
o> ne with java, and use the their processor power.

  Return to Index