|
Are you searching the product or record ?
On what basis do you want to search i.e name,id ?
is it stored in the database ?
What type of query you have written ?
<l>Thanks and Regards
Sandeep
|
|
|
|
|
i m using a like query on the product name
i m using the Stored Procedure.
Here is my procedure...
ALTER proc spr_getSelectedProducts
@Name varchar(100)=null
as
begin
declare @prod_name varchar(110)
set @prod_name=@Name + '%'
select det.Id,mast.name as Name,det.Type,det.Dia,det.Length,det.Laminate_Type,det.Varnish_Type,det.Colour1,
det.Colour2,det.Colour3,det.Colour4,det.Colour5,det.Colour6
from product_mast mast inner join product_det det on mast.id=det.product_mast_id
where mast.name like @prod_name
end
Sir basically i have the problem of flow of pages..
This stored procedure is giving me the desired result.
-- modified at 8:25 Monday 12th February, 2007
|
|
|
|
|
This is wrong i think you should have unique product id as promary key in the database and retrive the data using that ...........
Again i am not clear of your question means What actually you want stored procedure,query or modal dialog box related something ?
<l>Thanks and Regards
Sandeep
|
|
|
|
|
Sir I have two tables Product_mast and Product_Det
Both the tables have a common field Product_Id.Also Product_Id is the primary key in the Product_Mast table.
Now more than one products may have same name(like Colgate100Gms,Colgate200Gms).When i Will write Colgate and search,it will show me the details of both products in a Htmltable
and i can update any of them because i have a edit button in last column of every row.
Upto this i have done.
Problem arises when i m clicking on the search button.
On click of the search button a i have called a javascript function
btnSearch.Attributes.Add("onclick", "poponload();")
poponload() is a javascript function.Which opens the modal page.
function poponload()
{
testwindow= window.open ("frmSearchProdCondition.aspx", "mywindow","location=1,status=1,scrollbars=1,width=950,height=400");
testwindow.moveTo(40,170);
}
Now in frmSearchProdCondition.aspx page i m receiving the name of the product in a textbox and sending it to the next page where i want to show the result in a htmltable.
on click of OK button in modal i m closing the current modal and redirects to the next page which is showing me the result..
The size of my modal is width=950,height=400...............
funny thing happens when i m closing the modal and redirecting to the next page
it opens in the same height and width......
I want to close the modal and open a normal window...
Hope now u understand my problem..
|
|
|
|
|
Hi all,
Here is what i want 2 do...
I have a datagrid which displays employee information with empid as primary key.This info is populated from Employee table. I have another table Book which contains empid,date and no of free slots for that date. I need to create an template column in the datagrid with an image in each row and onmouseover of that image should display the no of slots for current month for that employee.
If this is difficult 2 answer just tell me how do i assign different attributes to different rows depending upon the empid.
|
|
|
|
|
Try this:
<asp:TemplateColumn SortExpression="Name" HeaderText="Name">
<HeaderStyle ForeColor="Black" Font-Bold="True"></HeaderStyle>
<ItemStyle Width="30%"></ItemStyle>
<ItemTemplate>
<img src="../Images/User01.gif">
<asp:LinkButton runat="server" CssClass="GridItemLink" CommandName="Select" Text='<%# DataBinder.Eval ( Container.DataItem, "Name" ) %>' />
</ItemTemplate>
</asp:TemplateColumn>
and add href for the same.
|
|
|
|
|
what is active directory ???
|
|
|
|
|
|
|
Hi All,
I want to display the last Access Date and Time of the record from the table, Every time (or) every access of that record.
I need the query for that using sql server 2005.
Logu
|
|
|
|
|
If, in your database table, you have a field that stores the Last Access Date and Time then you will just need a select statement for e.g.
SELECT LastAccessDateTime FROM myTable WHERE myRecordID = 'SomeRecordId'
If you don’t have a field that stores that value then you might want to add the field in the table and use Triggers to update that field or you could also do it programmatically.
HTH
Robert
|
|
|
|
|
I want to extend built-in Role Provider to enable certain features to certain Roles.
In asp database (SQL) i added two tables Features and RoleHasFeatures with correct implementations.
I tried few things when building a custom role provider:
1. I inherited from SqlRoleProvider and added functions that will work with my features ( AddFeature,.....)
2. I built custom provider from scratch and also added functions that will work with my features ( AddFeature,.....)
In both cases there is a problem i can't solve.
How can i access my provider within code?
What i want to do is, lets say, in some aspx page to write this
MyRoleProvider.AddFeature( textbox1.text );
I tried casting various objects but i couldnt find the right one
Any ideas?
|
|
|
|
|
Hi All,
I have created a control.
So please help me in getting the query and i m using SQL server 2005.
I have a table in which i have 100 records. I need a query to display a single record per day ie., for the 100 days i have to display 100 days and then on the 101th day the 1st record should come.
So please help me in getting the query and i m using SQL server 2005.
With Regards,
Logu
|
|
|
|
|
Do you mean per each day you have to return one record, and for 100 days you have to return 100 records??
|
|
|
|
|
yes. Absolutely if there is 100 records it will be displayed for 100 days. and on the 101st day the first record should be displayed again.
and my datebase schema is
MessageID : int
Message : varchar(MAX)
DisplayDate: datetime.
Logu
|
|
|
|
|
Where are the 'days' coming from ? Do you mean you want to start today, and every day, show one ? To do that, you need a start date. Then, the easiest thing to do would be to use the % operator to get the number of days since the start, mod 100, and pass that as an Id to a simple query, return * from myTable where MessageId=xx
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I want to get the days from the server and i need the code for that too becoz the date and time may vary so i want to set the date and time in the server.
Logu
|
|
|
|
|
You have to specify startdate and enddate to get top 1 record
e.g.
select top 1 * from tablename where [date]=dateparameter
plz give me more inputs to face-out on this
|
|
|
|
|
Hi,
The Start Date is taken care by the server. And every day we have to show single record on every postback (or) Refresh. If there may be 100 records then 100 dates will be created bt the server and them on the 101st day the server will create the 101st date but there will not be any message in the table so at that 101 date it should display the 1st message which is shown on the first day.
So i need a query for displaying the message.
Logu
|
|
|
|
|
Sorry, but still I'm not clear...
You mean that you want to display only one message based on last date??
|
|
|
|
|
Hi,
If there is 10 records with the Server date, and if there is no record on the 11 row ,it should display the first record with the 11 th day date which is the server date.
I hope this will give a clear idea.
Logu
|
|
|
|
|
Could this be
SELECT TOP 1 * FROM TableName ORDER BY [date] desc
Sorry if i didn't understand yet
|
|
|
|
|
Thanks for your help.I have got the answer.
Logu
|
|
|
|
|
I would like to share me that answer if you don't mind.
|
|
|
|
|
What have you already written ? What do you mean by 'a record per day' ? What's 'the 100 days', just an example ?
What is your database schema ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|