.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan
Santhakumar Munuswamy
Fauzul Azmi
Asad Ali
Post New Web Links

Search field question

Posted By:      Posted Date: September 03, 2010    Points: 0   Category :ASP.Net
 
hi guysin my database i have one table that has basic patient information (id,name,dob etc, visit date etc)i would like for the user to be able to search for a patient based on his unique personal id number and return the fields i specify (name,lastname) in the gridview. my problem in that one patient may have multiple visit dates. i would like the gridview to return the following as an exampleName     Lastname   Visit dateJoe         Johnson      10/05/10Joe         Johnson      13/08/10joe         Johnson       20/09/10from that the user will be able to click on the visit date that he wants to see the details aboutmy problem in that since the user ID is a unique field in my table i dont know how to create multiple visit dates. i think i should put the visit date in a different table and create a relationship but then i dont know how to present details from 2 tables in one gridviewthank you


View Complete Post


More Related Resource Links

Geometry Search Question

  
Hello Group, I am have a column of gemetry type in my sql server 2008 database.  I stored POINT data there IE( POINT(23.989899, 21.090909).  I have a parameter page in which I allow users to put a range on the latitude and longitude. My question is, how can I use those parameters in a where clause to limits the records that come back based upon what the user enters? I have seen examples for most geometric data types but nothing for POINTs.  For example, if the user enters in a latitude of greater than 10.010101 and a longitude of 45.999999, I want to return all the records containing lats > 10.010101 and longs greater 45.999999..... I have tried several solutions with nothing working so far... Any ideas? thanks.  

Text Search Strategy Question for the SSIS Gurus...

  
BACKGROUND: As I have mentioned in some of my other posts I am using SSIS 2005 to replace an existing MS Access 2003 / VBA based ETL engine which I developed some years back.   Part of my existing Access-based ETL performs a text search of the source records and I am now attempting to replicate that functionality in SSIS (replicate in terms of the end-result and not necessarily the methods used to get to that end result).  I have an idea of how I plan to go about this but since am relatively new to SSIS so would greatly appreciate the feedback of those more experienced... DETAILED DESCRIPTION: In the source (Sybase ASE15) database, there is an "object" table (not the actual table name but for illustrative purposes it will suffice).  Within the object table there is a "description" column which is a char(60) datatype.  The description column simply represents a description of the object as defined by the source system end-user. For my ETL solution I allow the ETL administrator to define one or many (1...n) key words or phrases which represent search criteria.  These search criteria are stored in a reference table in my target SQL Server 2005 database (the same database to which my ETL will transform results and store them).  My objective, is as follows:  For each of the 1...n search criteria defined, try and find th

Adv Search not returning calcuated field

  
I have a custom column associated with one of my content types, which I've set up as a Managed Property under Central Administration, and added to the Properties filter on my Adv Search page.  When I select this property in Adv Search, and specify a value that I now exists (on several documents), I get no results.  Non-calculated custom properties that I've set up work fine. Any ideas if there is some special config/requirement for search to return results based on caclulated column values? I set this up as follows: 1. Created the custom column on the content type 2. Created a managed property that maps to the crawled column "ows_MyCalculatedField" (in the mapped properties page this column showed up under Crawled Properties) 3. I reset the index and then ran a full crawl 4. I updated the Adv Search screen web part and added the column to the web part XML that defines what properties appear in the Properties picker list (the property shows up fine and I can select it and run a search) However, when i run the search for any value in the field, I get no results.  And I know there are documents that have the values I entered. Thanks

Multible search criteria with empty field option

  
I have a gridview with two textboxes (first name & last name) and a linkbutton to search results inside the gridview.I have made select parameters as well and the search works if i write in both textboxes. However, if I leave one textbox blank, i don't get any results.------------------------------First Name: <asp:TextBox ID="txtSearch_FName" Width="100px" runat="server"></asp:TextBox>&nbsp;&nbsp;&nbsp;Last Name: <asp:TextBox ID="txtSearch_LName" Width="100px" runat="server"></asp:TextBox> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:LinkButton ID="LinkButton1" Text="Find" runat="server" OnClientClick="return check();" /><asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="ID" DataSourceID="Searching" CellPadding="4" PageSize="15" GridLines="Vertical" onrowcreated="GridView1_RowCreated" Width="100%"><PagerSettings Mode="NumericFirstLast" /><HeaderStyle BackColor="#666666" /><AlternatingRowStyle BackColor="#f4f4f4" /><FooterStyle BackColor="#666666" />  &

How can I get search to work for a Custom Document Library with a few third-party field types?

  
Hi, Using WSS 3.0 with SQL Server 2008 for Workgroups I have created a Custom Document Library (2,462 files - copied from folder into Explorer view and then renamed using Batch Update in web services i.e. "BaseName" field) - basically it uses three fields that are of "Filtered Lookup" (a field type from a third party). The document library is included in the search (i.e. Advanced Settings), but it displays none of the files - bascially not included in search at all with all testing I have done. I created a new Document Library called "Test" and uploaded a document and it is included in the search. Is there any way I can debug this. Is there a log file? Is there something in the Search Database that might help? Your help would be really appreciated as this is my last issue - and its soooo important to the deliverable. Thanks. John.

search field

  
hi, I want to have a search field in mvc2 asp.net that with click on search button redirects to page with address: "xyz/search/?name=&amp; FolderNum="  But get this error: A potentially dangerous Request.Path value was detected from the client (?).

SharePoint 2007 Enterprise Search Scope Question

  

Hello,

I have configured different search scopes to point to different search contents on my MOSS server and had them displayed on cope dropdown menu.  Everything is working great but with one issue; the selected scope from the default Search page does not stick on the Result page.

For example, I have three scope choices available on my scope dropdown menu: scope1, scope2, and scope3.  For this particular scope Display Group, I have selected "scope1" to be the default.  So when I go to the main Search page, "scope1" is shown as the default choice on the scope dropdown menu.  If I select another scope from the dropdown menu (e.g., scope2) and perform a search, it takes me to the Result page showing the result of the search and also shows what I typed in in the search text box.  The problem is that although I selected "scope2" on the original page's dropdown menu, the result page's dropdown menu shows "scope1" which is the default choice and not what I selected on the original page.  This behavior is confusing to my end users who want to refine their search from the Result page but then they have to re-select "scope2" from the dropdown menu.

My question is, is there a way for me to make the selected scope choice from the original page to stick on the Result page's s

SharePoint 2007 Enterprise Search Scope Question

  

Hello,

I have configured different search scopes to point to different search contents on my MOSS server and had them displayed on cope dropdown menu.  Everything is working great but with one issue; the selected scope from the default Search page does not stick on the Result page.

For example, I have three scope choices available on my scope dropdown menu: scope1, scope2, and scope3.  For this particular scope Display Group, I have selected "scope1" to be the default.  So when I go to the main Search page, "scope1" is shown as the default choice on the scope dropdown menu.  If I select another scope from the dropdown menu (e.g., scope2) and perform a search, it takes me to the Result page showing the result of the search and also shows what I typed in in the search text box.  The problem is that although I selected "scope2" on the original page's dropdown menu, the result page's dropdown menu shows "scope1" which is the default choice and not what I selected on the original page.  This behavior is confusing to my end users who want to refine their search from the Result page but then they have to re-select "scope2" from the dropdown menu.

My question is, is there a way for me to make the selected scope choice from the original page to stick on the Result page's s

QueryExtender Control - Variable field name to search against

  

FrownI have been alerted to the Query Extender control through previous posts, but I am still seeking the final part of my desired solution.

NB the following is written in conceptual English (programming specification) format, rather than actual asp code.

While I fully understand that I can use the QueryExtender control to pass a parameter from one web page to another, I do not see, and maybe this is not even possible, how I can pass a parameter of which field I want to select on.

Ideally I would like to be able to implement a query which is

SELECT tiles where 'Passed Variable Name' contains 'Passed Test Value'

such as would then generate, for example -

SELECT titles where 'Series Available' contains 'A'

OR

SELECT titles where 'Authors' contains 'Wyndham'

but I just can't work out how I can implement the varying search field.

Is what I am seeking for possible? OR

Am I going to be forced to implement an approach such as the following?

SELECT Calling Web Page

CASE "Series" 

SELECT titles where 'Series Available' contains 'passed variable'

CASE "Authors"

Calculated field Sorting Now Working , but have performance question

  

 Thanks to mitja.GTI.

My sorting is working ...

although i had to take the table that has my calculated column and make a view (so i could filter) and then bind the gridview to the view.

My question is as this.

1.) in order to get my calculated field i had to load my data into a table (as suggested)

2.)Add a column to the table and perform calculations

3.)make a dataview from the tables because i could not get the Gridview.datasource= ds.tables("loads").select("Deadhead <= " & sngRadius

4.)the largest of the 3 tables my query is based on contains about 7000 records. The way i have the logic & programming now everytime a new "truck location" is put in the textbox1 and "find loads/button1" is clicked. It calculates the deadhead miles of all 7000 records before filtering. I am filtering based on the deadhead miles.

Does anyone have any recomendation about how to speed this up a bit.

Also in order to get paging to work i had to rebind/filter the data again ... means looping through all 7000 records each time paging is called. This seems terribly ineffecient as i am already forced to use access instead of SQL.

Wou

LinqToSql: Calculated Field Question...

  

Hi There,

 

Im currently using LinqToSql to get a list of groups from the database. (tblGroups)

In code, im iterating through my collection (tblGroups) and counting sub-elements of tblGroups and storing the whole object in a DTO (simple object) with an additional property (UserCount).

When these are stored in a simple object, the UserCount is worked out by looking through each group and counting the users inside and making sure they fit a certain role.

 

This starts to hamper performance when I have so many groups and i would like to take all of this to the database layer and work it all out initially.

 

My question is:

What is the best way to achieve this? I would ideally like to remove the DTO as this adds a whole new layer. Could I add a new property to the database (like a calculated field) that is populated everytime this info is request as say: a stored procedure?

 

Thanks

 

Sean


Advanced Search in date field in sharepoint 2010

  

Hello,

I have a question about advanced search that field a Date,

When searching the date field the sharepoint can not find any document and writes:

"No results found appropriate."

When going to standart search the sharepoint find documents also in date search .

in central administration in metadata properties- the  Data of the field is set.

What could be the problem?


How is the HitHighlightedSummary field derived in the search results?

  
Hi,

Can anybody tell me exactly how this field is derived in the search results?

I have a custom list with various fields. One field is an HTML field which typically contains a large amount of HTML content. This field has been mapped to a managed property and the list is being cawled.

When a search is executed with a keyword, sometimes the HitHighlightedSummary returned from search contains the keyword and sometimes it does not. The only thing that appears to be different between the list items is the position of the keyword within the HTML content. The keyword appears early in the content for the list items that return the keyword in the HitHighlightedSummary but it appears well down in the content when it is not included in the HitHighlightedSummary. When the keyword is not included, HitHighlightedSummary seems to contain a combination of data from a number of fields.

Is it possible that HitHighlightedSummary only considers the first N characters/bytes of fields?

Thanks.

Question regarding result types in Sharepoint Enterprise Search

  

I'm trying to setup search scopes for content sources that are various shares on file servers in our domain, and the main things users will be searching for are autocad drawings and folders - searching by file/folder name. I've added the dwg file type to the list of file types included in the content index (we'll see if they show up in search results after the next incremental crawl), but I don't know how to add folders as a result type. Ideally, a user will be able to check off a box for Drawing/Folder/Word Doc/Spreadsheet/etc. right next to the text box where they enter the search term(s).

Any ideas?


use question mark in search representing exactly one character - possible?

  

Hi,

Is there way to use the question mark ? in MS SQL Search Expression? Like so:

SELECT [Name] FROM [dbo].[Users] WHERE [Name] = "M?yers"

The ? stands for exactly 1 character. I tried LIKE

SELECT [Name] FROM [dbo].[Users] WHERE [Name] LIKE "M%yers"

but the % represents 0 or more characters!

Thanx for help,

S.


Infopath Question: XPath code to remove domain name from AccountID field in Person/Group Picker

  

I have an infopath email based submission form where I am using the Person/Group picker as a way for people to find people in the active directory to CC the form to. I was using the field "DisplayName" in the control and discovered that when you try to CC several employees, that it would disrupt the rules and you can't send the form.

I want to use the field "AccountID" but it includes the domain before the email alias (for ex. REDMOND\johndoe). Is there a formula code I could use to remove the domain from every email alias. Right now my CC formula is concat(SubmitterAlias, "; ", DisplayName)


Sharepoint 2010 Foundation search question

  

I'm new to Sharepoint and have just setup 2010 Foundation.  I know that it's search will only index the contents of Office docs and that you can't install ifilters in Foundation.  However, I would think that all documents uploaded to a doc library should be searchable by file name, is that correct?  However, using pdf's has an example, in my testing, search results come up empty when searching for keywords in the filename.  In order to make these files searchable, I have to edit their properties and add a Title.

I know that not all users will bother to manually add a Title to all documents, so we need to be able to find files by their names, how is this possible?

Rich


Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend