|
Hi,
I am migrating my DB from a C++ Structure system to SQL. As an example, I take the 'Order Table'
The CPP struct for an Order comprises of a header, containing all sorts of usefull info, like who owns it, who donne it,how many items, followed by an array of 32 possible 'Order Items', each containing amongst others: a TimeStamp, A Quantity, a narrative, an amount, and a WhoDunneit, as wel as obscure CPP management information to avoid data clashes.
This goes together with carefully crafted rules about who can edit what. (Each user can only edit own items, but suitably empowered supervisory personell can edit all entries.)
The method that worked best was what we called the 'Pragmatic Upate' The Update that updates from the original datafirst, wins. All others fail, and get a view of the latest version. Does SQL act like this, or do i need tricks to implement this.
The table was stored in a file,as an array of structures of this kind.
I hope to re-write the new version in C# ,ASP.NET.
First Stumbling Block: how do I create my array of items in an SQL Database. (come to think of it, how do I create the 'Item' array element in the first place.)
Bram
Bram van Kampen
|
|
|
|
|
Yes, SQL can store the data you describe quite well.
Here are a few terms you may want to research:
1) Primary key
2) Foreign key
3) Transaction
Basically what you describe is a classic Master-detail relationship where the Order is the master and the Items are the details. You would define a primary key on the Order table which uniquely defines the order, then that primary key is used in the Items table as a foreign key (relating all of the Items back to the single Order).
When you do updates to the Order/Items, you will use a transaction which ensures that all of the updates across all of the records are performed consistently or not at all.
Hope this helps.
|
|
|
|
|
Hi,
I am saving the following html in a database the trying to display it to show the recent activities for my user. I am doing this because the recent activities might contain HREFs. The problem that my result is not showing properly. it's not aligned normal to left although I tried to add align='left' to the
what can i do?
here is the saved data in the text datatype field:
<div>Yahoo! Baby!.</div>
and I am displaying like this:
<asp:Table ID="Table1" runat="server" Width="100%" BorderWidth="1" BorderStyle="Solid">
<asp:TableRow>
<asp:TableCell HorizontalAlign="Left" BorderStyle="Solid" BorderWidth="1"><dx:ASPxLabel ID="lblDate" runat="server" Text='<%# Eval("event_log_date_time") %>'></dx:ASPxLabel></asp:TableCell>
<asp:TableCell HorizontalAlign="Left" BorderStyle="Solid" BorderWidth="1"><asp:Literal ID="Literal1" runat="server" Text='<%# Eval("event_log_title") %>'></asp:Literal></asp:TableCell>
</asp:TableRow>
</asp:Table>
and this is the result on the user's page:
http://www.jassimrahma.com/temp/align_problem.png[ ^]
Technology News @ www.JassimRahma.com
|
|
|
|
|
You don't have to use asp.net objects for all your html needs
Just use html, and then the asp.net objects just for the data fields, this is just a basic example.
There are 2 ways to set dimensions and alignments on html, one is using html, width="600" and the other using css style="width: 600px;".
I prefer using straight CSS, but when creating html for emails, you should use both.
<table cellpadding="0" cellspacing="0" border="0" width="600" style="width: 600px;">
<tr>
<td style="width: 295px; text-align: left; padding-left: 5px;">Your Object</td>
<td style="width: 295px; text-align: left; padding-left: 5px;">Your Object</td>
</tr>
</table>
FYI:
If you use padding, you have to subtract the padding amount from the total width of the element, some browsers will add the 2 together.
|
|
|
|
|
In a asp.net page how do i give export to excel option using javascript .
|
|
|
|
|
|
Javascript will somehow have to kick off server side code. But, using jquery's .ajax call you can do this. It will depend on how you have things setup. JS could pass the name of a stored proc that gets executed. Or it passes the value from a hidden field. Somehow you have to tell it what to export.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
this is my code on webform1.aspx
<asp:gridview id="GridView1" runat="server" width="100%" skinid="GridView"
="" onsorting="GridView1_Sorting" ondatabound="GridView1_DataBound" onrowdatabound="GridView1_RowDataBound" autogeneratecolumns="false" onpageindexchanging="OnPaging" showheader="true" allowpaging="True" showheaderwhenempty="True" allowsorting="True" onrowcommand="GridView1_RowCommand" pagesize="20">
<columns>
<asp:templatefield itemstyle-horizontalalign="left" itemstyle-verticalalign="Top">
<HeaderTemplate>Action</HeaderTemplate>
<HeaderStyle />
<itemtemplate>
<asp:linkbutton id="lnkverify" runat="server" text="Verify" commandname="Application_verify" commandargument="<%#Eval("RequestId") %>">
<asp:linkbutton id="lnkreject" runat="server" text="Reject" commandname="Appication_reject" commandargument="<%#Eval("RequestId") %>">
on webform.aspx.cs
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
try
{
if (e.CommandName == "Application_verify")
{
int RequestId = Convert.ToInt32(e.CommandArgument);
Response.Redirect("~/ApplicationDetails.aspx?RequestId=" + RequestId);
}
if (e.CommandName == "Appication_reject")
{
int RequestId = Convert.ToInt32(e.CommandArgument);
}
}
catch (ApplicationException ex)
{
lblsuccess.Visible = true;
lblsuccess.Text = ex.Message;
}
catch (Exception ex)
{
StackTrace st = new StackTrace(new StackFrame(true));
StackFrame sf = st.GetFrame(0);
int line = sf.GetFileLineNumber() - 1;
if (ex.Message.StartsWith("Thread") == false) { Response.Redirect("~/HandleError.aspx?ID=" + ex.Message, false); }
}
}
on Applicationdetails.aspx page i have a button control.on this button click event ,i want to change linkbutton's(this linkbutton is on webform1.aspx) text from "verify" to "verified".pls help me
|
|
|
|
|
Member 8701813 wrote: on Applicationdetails.aspx page i have a button control.on this button click event ,i want to change linkbutton's(this linkbutton is on webform1.aspx) text from "verify" to "verified".
Does not make any sense. You are on another page and want some text to be changed on a page which is not currently in view!
What it sounds is, after you click this button, whenever you visit the 'Webform1.aspx', you should see a new text. If so, on button click, set a flag (store it somewhere if needed as per workflow) that is accessible in webform1 page. When loading that page, use this flag and based on it's value set the text.
|
|
|
|
|
if it doesn't make sense....i vil change linkbutton's text on webform1.aspx
|
|
|
|
|
could u tell me how to set a flag pls
i have written my code...when i visit webform1.aspx 2nd time ,that record is not shown .....ie verfied record...so i have to set linkbutton's text to "verifid"....pls help me...what is d syntax to get linkbutton's text...pls help me
|
|
|
|
|
Member 8701813 wrote: i have to set linkbutton's text to "verifid"....pls help me...what is d syntax to get linkbutton's text.
You sound totally lost/new and would be difficult to help like this. It would be better for you to read a book and start of. Know basics before starting to code. It would help you.
|
|
|
|
|
how to create playlist in html5
i m using html5 along with visual studio2010
end of previous song next song should be start .....
|
|
|
|
|
It does not work like this here.
Here is what is expected of enquirers:
1. TRY first what you want to do! You may find that it's not that hard.
2. Formulate what was done by you that looks like an issue/not working.
Try them and tell if you face issues.
Members will be more than happy to help like this.
Via JavaScript, you can access the list and use following audio events to have a continuous playlist, using ended event along with play() and load() .
I am not sharing more for you to try in the direction said.
|
|
|
|
|
Anyone plz help me to find 70-480 Book plz
|
|
|
|
|
This is not the right forum; try Google or a book store.
|
|
|
|
|
i am beginer in dotnet ,I have dotnet4.0 installed in my computer
but inbulit sql server in dotnet4.0 how to using sql server management studio 2008
|
|
|
|
|
You question is neither clear nor understandable.
A google search is always helpful. Can you further clarify your question?
|
|
|
|
|
agrigold wrote: but inbulit sql server in dotnet4.0 how to using sql server management studio 2008
No. SQLServer is not installed along with .NET 4.0.
You need to install SQL Server 2008[^] separately to use management studio.
|
|
|
|
|
hi in my table request i have columns as follows
requestid,applicationid,statusid,usertypeid & the data is
1,xxxxx, 1,6
2,xxxxx,2,7
3,xxxxx,3,8
i vil pass requestid to a storedprocedure , and i want to increment statusid,usertype by 1.
create procedure updateusertypeid_statusid
@requestid int
as
begin
update request set usertypeid += 1, statusid += 1 where requestid = @requestid.....this is not working
pls help me to implement this requirement
|
|
|
|
|
usertypeid =usertypeid + 1 i am getting the required o/p
|
|
|
|
|
What is the timing of the implementation of the web؟
هـر جا چراغی روشنه از ترس تنها بودنه ای ترس تنهایی من ، اینجا چراغی روشنه
|
|
|
|
|
I am sorry but this question makes no sense. Can you try explaining your problem in more detail?
من متاسفم، اما این سوال باعث می شود حس. آیا شما سعی می کنید تا مشکل شما را در جزئیات بیشتر است.
|
|
|
|
|
What tools should be used for scheduling the Web?
هـر جا چراغی روشنه از ترس تنها بودنه ای ترس تنهایی من ، اینجا چراغی روشنه
|
|
|
|
|
What do you mean scheduling the web? The web is the internet, it is always there.
|
|
|
|