|
mehrdadc48 wrote: Hi,
I have a table 'Tbl1' with 3fields: NidTbl1, NidTbl2,number.
NidTbl1 is primary key and NidTbl2 is a foreign key.
Now how can I get the NidTbl1 which all number fields are greater than 0
First of all this Question has nothing to do with ASP.NET.
mehrdadc48 wrote: Now how can I get the NidTbl1 which all number fields are greater than 0
Select NidTbl1 from Tbl1 where number >0
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Sorry I went wrong.
I want the NidTbl2 s which ALL number fields are greater than 0
Best wishes
|
|
|
|
|
This is no way related to ASP.Net.
mehrdadc48 wrote: Now how can I get the NidTbl1 which all number fields are greater than 0
Select * From Tbl1 Where NidTbl1 > 0
I would rather suggest you to buy a book and start reading.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Sorry I went wrong,
I meant the NidTbl2 s which all number fields are greater than zero
Best wishes
|
|
|
|
|
You seriously think of buying a book.
mehrdadc48 wrote: Sorry I went wrong,
I meant the NidTbl2 s which all number fields are greater than zero
The only change would be thn:
SELECT * from TBL1 WHERE NidTbl2 > 0
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
I just agree with others who replied your question.
You have already answer for your question.
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
www.aktualiteti.com
|
|
|
|
|
hi,
Is there some way in which i can bind the data of the textboxes,dropdownlists in a gridview,make it available for editing and then finally send it to the database.
the user should be able to see all the data that he has entered in the textboxes (temporarily)
|
|
|
|
|
Flavia A wrote: the user should be able to see all the data that he has entered in the textboxes (temporarily)
Gridview having its inbuild features of that. Are you looking for something different ?
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
i guess the data can be retreived from the database in a gridview then the data can be edited and sent back to the database.But what i want is in one form if there are 2 textboxes and 3 dropdown lists the data selected in the dropdown and text boxes should be available in the gridview or something similar for editing before going into the database and later it can go into the database.ie a temprory storage which later gets finalized and then sent to the database.
This is possible in the window application using datagrid.
|
|
|
|
|
See, You can fetch data into DataGrid as u like. U can use templates to put custom controls,just like u told abt textboxes & ddl.After that u can edit the data as u like using ButtonField like features of DataGrid. Is it so in ur way?
|
|
|
|
|
I want to develop status update like facbook's status update.
To do this job I use following technique.
I placed a repeater, textbox and button into a updatepanel. Repeater contain a label to show all status from DB. When a user click on the button, the text will save on DB. And all status( including new) will be shown automatically by repeater after updating database.
Here is my problem: After first clicking text is saved on DB. But page doesn't update with new status. After second click page update with the new status.
Have any problem in my concept? If yes. Plz inform me how can I update the repeater automatically after DB updating .
shahdat
|
|
|
|
|
When you are loading data in Repeater Control ? I guess there is problem related with PostBack.
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
I seems as you. Plz verify my c# code
protected void Page_Load(object sender, EventArgs e)
{ ShowAlerts(_alertService.GetStatusAlertsByAccountID(_userSession.CurrentUser.AccountID));
}
public void ShowAlerts(List<Alert> Statusalerts)
{
repStatus.DataSource = Statusalerts;
repStatus.DataBind();
if (repStatus.Items.Count == 0)
lblStatusMessage.Text = "You don't have any status alerts yet!";
}
protected void btnShare_Click(object sender, ImageClickEventArgs e)
{
StatusUpdate su = new StatusUpdate();
su.Status = msgText;
_alertService.AddStatusUpdateAlert(su);
}
txtStatusUpdate.Text = "";
}
plz help me.
shahdat
|
|
|
|
|
MD. SHAHDAT HOSAIN wrote: protected void Page_Load(object sender, EventArgs e)
{ ShowAlerts(_alertService.GetStatusAlertsByAccountID(_userSession.CurrentUser.AccountID));
}
Try this following,
protected void Page_Load(object sender, EventArgs e)
{
if(!Page.IsPostBack)
{
ShowAlerts(_alertService.GetStatusAlertsByAccountID(_userSession.CurrentUser.AccountID));
}
}
And Call the ShowAlert Method After the Table, means on Share Button Click.
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Thanks Im successful on behalf of your suggestion.
But a little problem show yet. if more than one status post within 60 seconds then later post print under the previous one. Is it a mater of timer or anything else.
Plz suggest me.
shahdat
|
|
|
|
|
MD. SHAHDAT HOSAIN wrote: But a little problem show yet. if more than one status post within 60 seconds then later post print under the previous one.
I didn't get your point. Sorry
Can you please explain me in little details . Hope I may help you
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Is there any way in which i can have a masked textbox in asp.net website?
i want 4 alphabetical characters to be entered in the begining of the textbox and the remaining to be numeric .
or can i have a javascript code to validate the textbox.
|
|
|
|
|
download ajaxcontrolToolkit....you will find it there.
CC26
|
|
|
|
|
Flavia A wrote: can have a masked textbox in asp.net website?
Here is few good reference for you
Xtended TextBox[^]
and
MAsked TextBox[^]
Hope this will help you
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Hi i want to check that this name exist in database or not.
thanks
vivek
|
|
|
|
|
if(select count(*) from tablename where username='username') >0)<br />
begin<br />
print 'Username exists'<br />
else<br />
print 'username does not exists'<br />
end
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
www.aktualiteti.com
|
|
|
|
|
rummer wrote: Hi i want to check that this name exist in database or not.
Create Simple SP, Pass the User Name as a parameter and check it is available in database or not. If yes, then alert user that User already exist, else go ahead.
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
ya also we want to check that name is allready exist or not
|
|
|
|
|
rummer wrote: ya also we want to check that name is allready exist or not
Please dont cross Post.
No one can understand your question, if they didn't read the last post. So, Either reply of my question or Modify your Last Post
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
rummer wrote: ya also we want to check that name is allready exist or not
Would you care to elobrate that?
What is the scenario? What have you done so far?
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|