Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET
I AM DEVELOPING ASP.NET WEB SITE WITH MYSQL DATABASE.
MY PROBLEM IS HOW TO HANDLE DATABASE WHEN MANY SAVING REQUEST FROM DIFFERENT WEB PAGE.
I AM USING AUTO GENERATE ID IN REGISTRATION FORM BUT HOW MANY TIMES THE WEB PAGE RUN IT SHOULD BE DIFFERENT FOR ALL.HOW CAN I MAKE DUPLICITY CHECK AND HOW CAN I LOCK MYSQL TABLE WHEN ONE QUERY IS RUNNING FROM WEB PAGE FOR VERY SMALL AMOUNT OF TIME.
PLEASE HELP ME.
Posted 14-Feb-13 0:53am
Edited 14-Feb-13 2:45am
RyanDev109.1K
v4
Comments
Nandakishorerao at 14-Feb-13 7:47am
   
no problem..the autogenerated ids wont get conflict
Member 8825505 at 14-Feb-13 11:21am
   
auto generate no is unique but the problem is how to manage auto generate at each web page hit.like at same time two person visited the page at that time how i will manage.
Nandakishorerao at 14-Feb-13 23:11pm
   
the sql executes sequentially.no need to get worry it wont cause conflicts.
Member 8825505 at 14-Feb-13 23:32pm
   
ok then we have to write simple code no need to handle it
Member 8825505 at 14-Feb-13 23:35pm
   
can you give example like we have one page say registration when it is published let say two user visit page and save reg information at the same time then how mysql manage that.
Nandakishorerao at 14-Feb-13 23:56pm
   
yes.you just write the required code.
Member 8825505 at 15-Feb-13 0:04am
   
http://pacesoftronix-001-site1.smarterasp.net/
there is registration page in this URL if two user hit the save button of reg at same time how to manage connection.
Nandakishorerao at 15-Feb-13 0:31am
   
if you are getting error mention it..because probably when you stated as connection i think there is problem in the exception handling.have you used finally block in code..if not add it and close the connection.
Member 8825505 at 15-Feb-13 0:45am
   
when i am hitting same page from different place one of them web page have error connection is used by data-reader after i have make exception handling now when i am hitting page there is error."connection must be valid and open"
Nandakishorerao at 15-Feb-13 1:11am
   
error in the datareader right..then check the datareader has the value or not.generally this error comes when it doesnt have rows.i.e datareader.hasrows()...
Member 8825505 at 15-Feb-13 1:52am
   
i didn't use any data reader.then also error comes and when i close con then the another error comes..i don't know how to handle data from web site accessing from different user.
please help.
Member 8825505 at 15-Feb-13 6:07am
   
do you have idea about updlock in sql.i want to implement in mysql database.
Sandeep Mewara at 14-Feb-13 8:56am
   
If they are autogenerated, they will be unique. Now, what is your problem?
Member 8825505 at 14-Feb-13 11:25am
   
its unique but i write code at save button event.if two user hit save button at the same time how it is managed.if i make mysql database table lock when one query is running i can be prevent but i don't know how it will implementable.please help.
Sandeep Mewara at 14-Feb-13 11:33am
   
Irrespective of two users at same time, it will never create duplicates.
Member 8825505 at 14-Feb-13 23:31pm
   
but how to managed save event if two user hit button at the same time
Member 8825505 at 14-Feb-13 23:49pm
   
let say user A hit save at t time and user B also hit save at t time then how to handle two two query..
Sandeep Mewara at 15-Feb-13 1:19am
   
Which part of my sentence is confusing? Irrespective of same time button press, DB will act one by one and thus, there will be no duplicate.
Member 8825505 at 15-Feb-13 1:45am
   
no there is error "connection must be valid and open"
Member 8825505 at 15-Feb-13 6:06am
   
do you have idea about updlock in sql.i want to implement in mysql databse.

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 254
1 Nirav Prabtani 223
2 Sergey Alexandrovich Kryukov 209
3 _Amy 165
4 Richard MacCutchan 135
0 OriginalGriff 7,799
1 Sergey Alexandrovich Kryukov 6,966
2 Maciej Los 3,994
3 Peter Leow 3,708
4 CHill60 2,742


Advertise | Privacy | Mobile
Web04 | 2.8.140721.1 | Last Updated 14 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100