473,405 Members | 2,176 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

update record & show form

hi friend
Could somebody please tell me how to update an access record having two primary keys?(vb.net, asp.net, access
Also how do we show a page from another page,for eg i am in page1.aspx and i have a button inside and if i click on that button it should open a new page,page2.aspx for me. i do some processing (eg write to a dbase) there and i click on ok.Upon clicking page2.aspx should carry out the required processing and return to the original page ie page1.aspx. Response.write doesn`t work because it gives me page2.aspx directly wihout showing me page1.aspx
---
Posted using Wimdows.net NntpNews Component - Posted from .NET's Largest Community Website: http://www.dotnetjunkies.com/newsgroups/
Nov 18 '05 #1
1 1621
Question 1:
1. Open a connection to the Access database using the SQLConnection
object.
MSDN has the connection string for Access database.
2. Create a SQLCommand object.
3. Execute your update SQL using the SQLCommand object.

Question 2:
In ASP.NET, it is a very different programming model from classic ASP.
Most elements on the page can be accessed as objects with methods and
properties on the server-side instead of using Response.Write.

In you case, I would do the following:

1. Create an HTML button on Page 1. Set the client-side event
"onclick" to call
javascript "window.location = 'Page2.aspx';".

2. On Page 2, create a Web Control button, and handle the server-side
click
event in the code-behind.

Do the processing you need in your code-behind.
When you're done, do a "Server.Transfer("Page1.aspx")" to transfer
back to
Page 1.

There are many sample code available on MSDN and other popular ASP.NET
websites such as www.asp.net.

Tommy,

radha <anju_gunowa@-NOSPAM-servihoo.com> wrote in message news:<#b**************@tk2msftngp13.phx.gbl>...
hi friends
Could somebody please tell me how to update an access record having two primary keys?(vb.net, asp.net, access)
Also how do we show a page from another page,for eg i am in page1.aspx and i have a button inside and if i click on that button it
should open a new page,page2.aspx for me. i do some processing (eg
write to a dbase) there and i click on ok.Upon clicking page2.aspx
should carry out the required processing and return to the original
page ie page1.aspx. Response.write doesn`t work because it gives me
page2.aspx directly wihout showing me page1.aspx.

---
Posted using Wimdows.net NntpNews Component - Posted from .NET's Largest Community Website: http://www.dotnetjunkies.com/newsgroups/

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: PAUL EDWARDS | last post by:
I have a windows form that is bound to a datatable. In VB6 I could just update the field contents and it would be updated in the database, however if I update the text property of the control from...
10
by: Jim | last post by:
Hi, Let me explain how I'd generally do things. For a page where the user edits data, I'd generally call it something like editfred.php (for example), the page which updates the data would be...
4
by: N. Graves | last post by:
Hello... thank you for your time. I have a form that has a List box of equipotent records and a sub form that will show the data of the equipment select from the list box. Is it possible to...
4
by: deko | last post by:
I'm a little nervous about slamming my database with a dozen Update queries in a loop that all modify RecordSources of open forms. Will the use of DoEvents and/or a Sleep function ameliorate any...
25
by: Neo Geshel | last post by:
This works: <form> <asp:TextBox id="name" /> <%= name.ClientID %> </form> But this DOES NOT work: <form>
5
by: Stephen Plotnick | last post by:
I'm very new to VB.NET 2003 Here is what I have accomplished: MainSelectForm - Selects an item In a public class I pass a DataViewRow to ItemInformation1 Form ItemInformation2 Form
16
by: Ian Davies | last post by:
Hello Needing help with a suitable solution. I have extracted records into a table under three columns 'category', 'comment' and share (the category column also holds the index no of the record...
0
by: Access Programming only with macros, no code | last post by:
ERROR MESSAGE: Could not update; currently locked by another session on this machine. BACKGROUND I have the following objects: Table1 - HO (which has about 51,000+ records) Table2 -...
2
by: sirdavethebrave | last post by:
Hi guys - I have written a form, and a stored procedure to update the said form. It really is as simple as that. A user can go into the form, update some fields and hit the update button to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.