Intranet JournalThe new discussion forum for Intranet Journal readers. Leave comments and questions for IJ authors. Suggest story ideas and provide feedback.
Question about the stored procedure from SharePoint content database
Hi,
I happened to visit Internet Journal - > Problem with Searchable phone directory.
It is very helpful. Now I had a question and wish you could help me.
My question:
When I use the stored procedure from SharePoint content database rather than Northwind (they both are in the same Database server), it does not work while it works in Northwind database well.
When I am trying to 'Show data' from Dataview in Frontpage2003, it gives me error message:
'The Data Source does not contain valid XML data'. The stored procedure works in SQL Query.
The Show Data option in FrontPage does not send parameters to the stored procedure. While in development, I would change the sproc to output some data without procedures. Then, when the development is finished, change the sproc back to input parameters.
I found "Building a Searchable Phone Directory with Windows SharePoint Services " article and found that it is what I need for our custom solution but I experience the same problem as mentioned in this thread.
I get
status: success
PassThrough_DataSet:
I tried to limit result, changed stored procedure to not accept parameters but nothing helped me so far.
I have enabled needed services in sharepoint and I see that SQL Profiler shows the correct line with parameters and it works for analyzer. Data view web part also shows records in case no parameter needed for stored procedure.
But sharepoint web part doesn't want to show records set in case custom query contains parameters for stored procedure N'::someparameter1::', N'::someparameter2::'.
Please, could you tell how you managed this?
If I have more than 5 columns, ie, 6 columns in search result part, say, I have office, email etc. However I tried, the search result part only show me 5 columns, what's wrong?
well i went back through and set up my table to be something similar to the northwind table with a last name and first name column and the search works find.
there are 3 other things i would like to know (damn i am greedy)
1- how to set it up so that when the user goes to the directory page it doesnt display the entire contents of the list. I would like the results webpart to display only after a search is made.
2- how to set up an additional search field such as "office"
3- how to get results to open into a new window.
if you can answer any of these it would be great... even better if you could touch on them all.
If I have more than 5 columns, ie, 6 columns in search result part, say, I have office, email etc. However I tried, the search result part only show me 5 columns, what's wrong?
Fudong
You have to manually add the columns to the Data View Web Part. You can drag them from the Tool Pane (right side) and drop them on the DVWP.
I assume you have a stored procedure that selects rows based on input parameters. Temporarily, change the select statement to include all rows. Here is an example.
Original:
SELECT LastName, FirstName, Extension FROM Employees WHERE LastName LIKE @LastName
Modified:
SELECT TOP 10 LastName, FirstName, Extension FROM Employees
Once you have the Data View Web Part displaying correctly, change the stored procedure back to the original.
I am all to new to SharePoint. I have been tasked to create a searchable phone directory for my organization. I have read the posted article but I don't understand it. I am not using Sharepoint Services for the portal. All I'm using is Areas because we mostly post documents. Is there a way I can create a phone directory using Sharepoint Server instead of Services? If so, please ...help me...I'm new to this and i don't know much about sharepoint. Thank you.
it works but why do we have to click Clear each time?
Why do you have to press Clear prior to a new search?
Why doesnt the form post a blank value when you delete the text in the Lastname field and type in some text in the firstname field. If you don't press Clear, it just post the Lastname previously entered.
Any solution to this? Because it makes the search unusable.
The form does not actually post to the server. The WebPart communications infrastructure processes the button click.
Why is the Clear button required -- I can't answer. Perhaps a bug in the WebPart communications, perhaps in IE, perhaps a deficiency in javascript...
I disagree with your conclusion. I know of at least 5 installations support thousands of users. In my experience, most users do not perform repeated searches. They search and then navigate elsewhere.
Paul, thanks for the reply.
I will get up to speed with these web parts and the communication infrastructure.
It is a great tutorial though - in about 2 hours I had a database containing regularly updated telephone numbers from our master employee db and a telephone search page! I am appreciative!