|
I have .net application which loads data from file into DB2 , Drive iSeries to connect to DB2.
Its running really slow (10,000 rows per 1 hour).
The application is simple doing bunch of inserts/updates. Any idea how I can speed it up?
|
|
|
|
|
I had problems like that last year, but with MySQL.
That's the speed rate I had, about 10K per hour, going from disk drive to database.
I had about 50 sets of data that were over 250K rows each, Some took about 8 hours, others 3 hours.
I ended up buying a new workstation, which cut the time down to about 3 minutes per 10K records, over a network.
This is with a Dell T3600 with a 6 core Xeon CPU. What a difference.
Then there's code optimization.
Load up everything first, then write each record one at a time,
There are a number of ways to go about it, not sure what you choose, you sort of vague there.
|
|
|
|
|
|
Hi everybody,
i would need help on creating a layout just like that of GMail using CSS... there would be three divs, the left and right divs are to be fixed while the middle div should scroll- but with the scroll bar at the right most part of the window{ not within the middle div itself}
I have tried to create somthing similar but all i could end up getting it having the scroll bar within the middle div itself...
any help would be appreciated
|
|
|
|
|
you mean this layout?
co nt en t co nt en t content
content
content
content
content
content
content
content
content
content
content
content
content
content
content
content
content
content
content
content
content
content
content
content
content
content
content
content
content
content
content
content
content
content
content
content
content
co nt en t co nt en t
if so try this code
<div style="width:300px;height:400px;">
<div style="width:250px;background-color:gray;margin:0 auto;">
<div style="height:40px;border:dashed 1px blue;"></div>
<div style="float:left;border:dashed 1px blue;width:22px;">content content content content </div>
<div style="float:left;border:dashed 1px blue;width:200px;max-height:180px;overflow-y:auto;">content content content content </div>
<div style="float:left;border:dashed 1px blue;width:22px;">content content content content </div>
<div style="clear:both;"></div>
</div>
</div>
and you can also use some jquery solution for scrolling
Help people,so poeple can help you.
|
|
|
|
|
Something like this?
http://jsfiddle.net/37moe1oa/[^]
<style>
#left
{
width: 200px;
position: fixed;
top: 0;
left: 0;
}
#right
{
width: 200px;
position: fixed;
top: 0;
right: 0;
}
#middle
{
margin: 0 200px;
}
</style>
<div id="left">
Left column content here...
</div>
<div id="middle">
Middle column content here...
</div>
<div id="right">
Right column content here...
</div>
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
thanks a million.... just exactly what i wanted......
|
|
|
|
|
i wanna make a simple form login with asp.net using ibm db2 ...
but i'm still new do not understand about db2 ,
hope someone can help me and give me simple tutorial ..
thanks first ...
|
|
|
|
|
You'll want to find some tutorials or articles on this site for learning ASP.Net and then separately need to learn how to use db2. Once you have something specific you are stuck on let us know.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
|
Dear readers,
I have looked around the internet and found loads of tutorials all linking OData Web Api's with Entity Framework support on Databases. But I have a multitude of OData web api's that facilitate the retrieval of data from the backend and I want to supply this data with some additional data manipulation to the outside world.
Is there a tutorial about this somewhere on the web? It can't be that OData WebApi's only exist supplying database data.
Best regards and thanks for your help,
Rémy Samulski
|
|
|
|
|
|
Dear Nathan Minier,
Thx for the link. At first glance I still don't see the whole picture but will try to figure it out tomorrow. Hopefully the brief tutorial will give me enough keywords and hints to solve this puzzle. Will post any findings.
Thx again,
Rémy
|
|
|
|
|
guys;
I use onsubmit event to add some data to the request when the form is submitting, but i notice that the handler is called when a submit button is clicked but not when .submit() function is called for the form.
i don't know if this is normal. if so, what else can i try?
another disappointing thing is that i found this sentence in this page[^]
The form's onsubmit event handler (for example, onsubmit="return false;") will not be triggered when invoking this method.
Help people,so poeple can help you.
modified 8-Sep-14 3:28am.
|
|
|
|
|
I'll take a stab at this, perhaps I will make some sense here. I think you are confusing a regular HTML page with an asp.net page.
It took me a couple of years to figure out asp.net, and how it handles the submit button.
One of the caveats of asp.net, is that you can only have 1 form tag. So you can't wrap multiple submit buttons with their own form tag, to create multiple default buttons.
Instead asp.net uses a script manager I want to say, I think that is what controls the submit behavior, which in turn writes JavaScript to control form action.
So to create multiple submit buttons, you have to wrap each form area in a container like a panel, and set the default button of that panel to the submit button inside the panel container.
So to answer your question:
On a button control like image button or button
You control the button with
OnClientClick = "run_javascript(); return false;"
Add Handler click Address Of button_click
So you can run JavaScript to validate, run a webservice, and based on what you return, say false, the handler will not fire the button event, or true, the handler will fire the button event.
Now there are ways to control the page submit event, but you have to be more precise as to what you want to do.
In the run_javascript above, you can use JavaScript to reprogram data in text boxes or input elements, that will post back to the server, thus the name input element.
|
|
|
|
|
Thank you Sir
My problem was't in validation but in add some data to the request that identify is used to distinguish between request threads associated with the page but not the session.
my problem was that some post request is made by calling the pre-defined function __doPostBack that calls .submit for the form so the event would not be triggered. instead i added a custom validator with a validation function that adds my desired data and not to modify .IsValid value. in this way the framework would call DoBostPackWithOptions instead of __doPostBack so the my custom validation function would be called and when a submit button is clicked the function Page_ClientValidate would be called by triggering on submit event.
Help people,so poeple can help you.
|
|
|
|
|
Oh OK, that makes sense to me.
I just call a jquery function using onClientClick and return the value of the function.
I gave up on the Microsoft validation stuff years ago.
I haven't seen a post here for _doPostBack in years, but it was a popular subject at ASPNet.com several years back.
|
|
|
|
|
HI All,
Kindly, provide me a code sample how to post a asp.net forms data to a third party API in XML format and handle the out XML in asp.net .
...Hotelbooking API ...
Please its very urgent .
THanks & Regards,
Martin.
|
|
|
|
|
I already done it for you, please check you email...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
If you are providing a solution, then you should post it here so others can see it.
|
|
|
|
|
It was urgent - so I just forgot the icon...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
should have known.
|
|
|
|
|
|
Hi,
First up, sorry if I haven't used the correct name for this interface style in the title. I'm not sure if there even is a correct name! What I am trying to do is to have a treeview on the left of the screen and an AJAX panel on the right. When a node is selected, a User Control is added to the panel (different controls depending on the type of the node).
This part works.
My problem is twofold.
1. If I select a node in the tree, the SelectedNodeChanged event fires, and causes the User Control to be correctly displayed. If, however, I click on the node that is already selected, the User Control disappears. I can only assume AJAX is updating the panel, but I can't figure out why. There doesn't appear to be an OnClick event for a TreeView..
2. When I click on the OK or Cancel buttons within my User Control, I want the postback to update my application and then leave the node selected with the User Control still displayed (Obviously, Cancel results in the contents being wiped...) Again, clicking the button causes the User Control to disappear.
Code:
Main Page
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div id="HomeLink">
<asp:HyperLink ID="HyperLink1" runat="server" CssClass="home" ImageUrl="~/Images/105329-3d-glossy-orange-orb-icon-business-home5.png"
NavigateUrl="~/Default.aspx">
</asp:HyperLink>
</div>
<asp:Panel ID="TreeArea" runat="server" CssClass="TreeArea">
<%----%>
<asp:TreeView ID="TreeViewSettings" runat="server" ExpandDepth="0" PopulateNodesFromClient="False"
CssClass="TreeViewSettings" OnSelectedNodeChanged="TreeViewSettings_SelectedNodeChanged">
</asp:TreeView>
</asp:Panel>
<asp:Panel ID="EditFormArea" runat="server" CssClass="SettingsFormArea">
<asp:UpdatePanel ID="UpdatePanelEdit" runat="server">
<ContentTemplate>
<asp:Panel ID="PanelEdit" runat="server">
</asp:Panel>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="TreeViewSettings" EventName="SelectedNodeChanged">
</asp:AsyncPostBackTrigger>
</Triggers>
</asp:UpdatePanel>
</asp:Panel>
</asp:Content>
protected void TreeViewSettings_SelectedNodeChanged(object sender, EventArgs e)
{
reload();
}
protected void reload(){
TreeNode selection = TreeViewSettings.SelectedNode;
string[] SelectedDetails = selection.Value.Split(new char[] {'|'});
RegionEditor RegionEditorForm = LoadControl("~/TheSettings/RegionEditor.ascx") as RegionEditor;
RegionEditorForm.RegionID = int.Parse(SelectedDetails[1]);
RegionEditorForm.CancelClick += new EventHandler(RegionEditorForm_CancelClick);
PanelEdit.Controls.Add(RegionEditorForm);
AsyncPostBackTrigger CancelTrigger = new AsyncPostBackTrigger();
CancelTrigger.ControlID = RegionEditorForm.UniqueID;
CancelTrigger.EventName = "CancelClick";
UpdatePanelEdit.Triggers.Add(CancelTrigger);
}
void RegionEditorForm_CancelClick(object sender, EventArgs e)
{
reload();
}
User Control:
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RegionEditor.ascx.cs"
Inherits="Shedulinator.TheSettings.RegionEditor" %>
<% if (false)
{ %>
<link rel="Stylesheet" type="text/css" href="../Styles/Site.css" />
<% } %>
<asp:Image ID="Image1" runat="server" ImageUrl="~/Images/106660-3d-glossy-orange-orb-icon-transport-travel-compass2.png"
CssClass="SettingsIcon" />
<asp:Panel ID="Panel1" runat="server" CssClass="SettingsFormPanel">
<asp:Label ID="LabelRegion" runat="server" Text="Region Name:"></asp:Label>
<asp:TextBox ID="TextBoxRegionName" runat="server"></asp:TextBox>
<asp:Button ID="ButtonCancel" runat="server" CssClass="SettingsButton"
Text="Cancel" onclick="ButtonCancel_Click" />
<asp:Button ID="ButtonOK" runat="server" CssClass="SettingsButton" Text="OK"
onclick="ButtonOK_Click" />
</asp:Panel>
public partial class RegionEditor : System.Web.UI.UserControl
{
public event EventHandler CancelClick;
protected void Page_Load(object sender, EventArgs e)
{
}
protected void ButtonCancel_Click(object sender, EventArgs e)
{
if (CancelClick != null)
{
CancelClick(this, new EventArgs());
}
}
}
Ideas, anyone?
Thanks!
|
|
|
|
|
The user control wont' persist upon post back, so it goes away.
I think it's in the user control, but I can't tell because there is not code for it.
You may want to start using Page.IsPostback to check the life cycle of the page before loading and unloading things
Member 10409255 wrote: There doesn't appear to be an OnClick event for a TreeView..
You can program events
SelectAction = TreeNodeSelectAction.Expand
Member 10409255 wrote: I want the postback to update my application and then leave the node selected
I don't understand that, you want to clear the tree view, or change the selected node?
Turn the visibility off, or change the CSS display to none.
Or change the node selected in code behind.
|
|
|
|