|
hello,
I am facing one problem in asp.net. when user click on save button, and during that time, if power cut off or due to some curcometances page closed then how can we rollback all records using asp.net.
Thanks in advance.
Regards,
Key
|
|
|
|
|
always a transaction ends with commit or rollback.
COMMIT means transaction is completed.
ROLLBACK --reverses the current transaction
If any tranaction breaks down in the middle then the transaction will rollback automatically
use
BEGIN TRANSACTION
COMMIT TRANSACTION
ROLLBACK TRANSACTION
in database procedures. so that you don't have to worry about power cut off
Regards John
|
|
|
|
|
J O N wrote: If any tranaction breaks down in the middle then the transaction will rollback automatically
That's correct. But in this case if the use closes browser before procedure complets execution, I don't think that it will rollback transaction. What do you say ?
|
|
|
|
|
I agree to your point. Save button click will save the data and browser close button click will close the browser window. in this case there is no way to stop the procedure execution or rollback the transaction.
Regards John
|
|
|
|
|
The idea could be to use the transaction from the page itself for eg:
SqlCommand cmd;
try
{
SqlConnection con = new SqlConnection();
con.Open();
con.BeginTransaction();
cmd = new SqlCommand("Update bla bla bla");
cmd.ExecuteNonQuery();
cmd.Transaction.Commit();
}
catch (Exception excp)
{
cmd.Transaction.Rollback();
}
In theory this should work. Please let me know if it helps.
Thank you
Laddie
|
|
|
|
|
hi everyone,
I have used css in my datagrid
For headers:
COLOR: BLACK;
FONT-SIZE: 13px;
FONT-FAMILY:Arial;
FONT-WEIGHT: bold;
TEXT-ALIGN:left;
HEIGHT: 30px;
TEXT-INDENT: 6px;
BORDER-COLOR:Black;
HEIGHT: 20px;
position:relative;
top:expression(this.offsetParent.scrollTop-3);
background-color: #EEEEEE;
z-index: 10;
But the Gridlines is not visible as column seperation in header row. can anyone help me in this regard.
Regards,
Manowj
|
|
|
|
|
Hi Friends
i use datagrid paging ,if i click paging the datagrid widthis increase or decrease depends upon the databinding.
how to fix the constant width in datagrid.
regards
saravanan
|
|
|
|
|
Hi,
On clicking Datagrid Press "F4" and go to properties and click the right most icon on top of the properties window. Go to Format tab and click columns and specify the width.
This will sort out the issue.
Regards,
Manowj
|
|
|
|
|
hi
plz tell me clearly
if possible tell the code
regards
saravanan
|
|
|
|
|
I want to input the date in a textbox in the details view control in the insert item template can you help me plz?
BiG RaLpH
|
|
|
|
|
Does anyone know of a grid control that would mimic the grid control used in MS Outlook and Microsoft Live! website. Specifically, I'm looking for a control in which I can bind the data in one row of a record to "One Cell" in a grid, but in different locations. So, in the end, I would have Field 1 in the first line, field 2 in the line right below field one, field 3 in the top-right hand corner, and so on, placing the fields as I like.
to get a better idea, you could look at the Outlook grid when the Reading Pane is set to be on the right, instead of the bottom.
Thanks
RR
|
|
|
|
|
Why don't you just use the Gridview control with a custom Template field. You could also try a datalist as this should work as well.
As far as custom controls go I use the ComponentArt library, this will also do what you are looking for (assuming I totally understand what you are looking for)
|
|
|
|
|
Hello Everyone,
Can anybody let me know how to embed "Real Player" in ASP.NET web Application to run the .Rm and other audios/videos
|
|
|
|
|
WE have an ASP.NET forum, and in fact, you're going to do this, if it can be done, through HTML anyhow. There is no support in ASP.NET for real player, but if the real player supports this, it's just a case of embedding the right HTML in your page.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
So what you just said.... If it's impossible, you can't, but is it's possible, just do it
Please vote my message! Click on one of the numbers beside ' Rate this message'.
.: I love it when a plan comes together :.
http://www.zonderpunt.nl
|
|
|
|
|
|
How to send the input to the crystal report form the main forms
|
|
|
|
|
Please don't cross post
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi, all
In a web application, how to select a folder(but not just a file)directly in a dialog like the winform's. I use a class FolderNameEditor.FolderBrowser but it's not shown correctly. Please help me if you have some idea.
Thanks
Best regards
|
|
|
|
|
There's loads of ways! Mostly I use this[^] treeview, but I can imagine you don't want to buy such a control for just a directory tree. However, have you considered filling a dataset and display is using a grid? You can even generate a HTML table or something....
Please vote my message! Click on one of the numbers beside ' Rate this message'.
.: I love it when a plan comes together :.
http://www.zonderpunt.nl
|
|
|
|
|
Need help here Badly...
i created a gridview inside a gridview (this is to view the extended details of a certain person because of too many fields, i decided to do this.) which is binded to a sqldatasource. i can now get the value of the PersonID and store it to a session variable named Session("PersonID").
Now, my Problem is, how am i going to pass the Session variable to the sqlDataSource when the sqlDatasource and the Gridview is Inside a Gridview?
|
|
|
|
|
Hi friends
I have two DataTable with same structure one coming from DataBase and second I create dynamic.
Now I have 5 records in datatable1 and 5 records in DataTable2.
I want to Merge DatatAble2 into Datatable1
I am trying this.
DataTable1.Merge(DataTable1);
But after that I am getting only 5records instead of 10 records.
thanks in advance
Pathan
---------------------------------------------------
|
|
|
|
|
Are the primary keys between the two DataTables the same? This ispossibly why you're only seeing 5 records still.
from MSDN[^]:
When merging a new source DataTable into the target, any source rows with a DataRowState value of Unchanged, Modified, or Deleted, is matched to target rows with the same primary key values. Source rows with a DataRowState value of Added are matched to new target rows with the same primary key values as the new source rows.<br />
|
|
|
|
|
I have a question how to abandon session when user right clicks on task bar and selects close. I know how to abandon session in the case the user presses alt+ F4.
Share ur ideas with me
Thanks in advance
surya
|
|
|
|
|
Hi surya,
I would be intrested to know how you abandon the session when the user closes the web browser. As far my knowledge goes the session will still be active till the timeout period is reached even though the the browser is closed.
Since the is no way IIS could determine if a browser is open or closed.
Thank you
Laddie
|
|
|
|