updating information to database

updating information to database

am 06.10.2007 20:45:05 von navin

Hi All,

i have page which shows supplier information in a table format.


Supplier Name Contact Email
AAA xxxxx xxxxxxx


In order to change or update information for the supplier, i want to
display supplier name in the table cell as a link.


so if user clicks on the link with the supplier name, it should take
the user to another page (suplier update page) where it should
display
the supplier information in text boxes. if users wants they can then
change information and update it into database.


Could anyone please tell me how to do the abve.


If anybody has any other idea to update the information in database,
please share.


Appreciate any ideas on this.


thanks,


Navin

Re: updating information to database

am 06.10.2007 21:17:52 von reb01501

navin wrote:
> Hi All,
>
> i have page which shows supplier information in a table format.
>
>
> Supplier Name Contact Email
> AAA xxxxx xxxxxxx
>
>
> In order to change or update information for the supplier, i want to
> display supplier name in the table cell as a link.
>
>
> so if user clicks on the link with the supplier name, it should take
> the user to another page (suplier update page) where it should
> display
> the supplier information in text boxes. if users wants they can then
> change information and update it into database.
>
>
> Could anyone please tell me how to do the abve.
>
>
> If anybody has any other idea to update the information in database,
> please share.
>
>
> Appreciate any ideas on this.
>
>
I would suggest you give Eli Robillard's GenericDb a try. Although the
version I used a few years ago didn't exactly follow best practices, perhaps
he's updated it since then, and, even if he hasn't, studying the code should
give you an idea about how this is done.
http://www.genericdb.com/

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"

Re: updating information to database

am 09.10.2007 17:00:20 von Adrienne Boswell

Gazing into my crystal ball I observed navin
writing in news:1191696305.305459.180630@o3g2000hsb.googlegroups.com:

> Hi All,
>
> i have page which shows supplier information in a table format.
>
>
> Supplier Name Contact Email
> AAA xxxxx xxxxxxx
>
>
> In order to change or update information for the supplier, i want to
> display supplier name in the table cell as a link.

AAA

>
>
> so if user clicks on the link with the supplier name, it should take
> the user to another page (suplier update page) where it should
> display
> the supplier information in text boxes. if users wants they can then
> change information and update it into database.
>

sql = "SELECT fields FROM table WHERE id = " & request.querystring("id")
'open up recordset, assign values, eg: name = rs("name")

if request.servervariables("REQUEST_METHOD") = "POST" then
if request.form("name") <> "" then
update = "UPDATE table SET field = '" & request.form("name")
& "' WHERE id = " & request.form("id")
'execute statement
'maybe take the user back to the original page
else
'give the user some sort of message
end if
end if
%>

">
Update Information
id="name" value="<%=name%>">

">





>
> Could anyone please tell me how to do the abve.
>

See above... you can do a lot more, create functions, etc.

>
> If anybody has any other idea to update the information in database,
> please share.
>
>
> Appreciate any ideas on this.

HTH


--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share