Newbie. Want to use webservice with Infopath

C

CC

I want to write a simple webservice that will take a parameter from
Infopath, run a stored procedure in SQL Server, and return the records
in the form of a dataset. I downloaded Infopath SP1 preview, and I
read the article found at
http://msdn.microsoft.com/library/d...y/en-us/odc_ip2003_tr/html/odc_INF_Lab_09.asp.

I followed the steps (using the Data Apater Wizard) and was able to
get a simple test working without a parameter, but when I added a
parameter to the stored procedure and tried creating another data
adapter with the wizard, I ran into problems. The wizard gives me the
error "Some parameter bindings are missing. Values from the dataset
will not be used for those parameters". If I continue at this point,
generate the dataset, and construct my webmethod - nothing works. I
build and run thru Visual Studio, click on my webmethod, press the
'Invoke' button from the browser, it says: "Procedure
'spFindDocByName' expects parameter '@docName', which was not
supplied."


I am going crazy! doesn't seem like it should be this hard.

Can anyone help, please? Any sample code (pref C#) would be
appreciated.

My stored proc:

CREATE PROCEDURE [dbo].[spFindDocByName]

@docName varchar(50)

AS

SELECT siteID, DirName, LeafName
FROM Docs
WHERE (lower (LeafName) = lower (@docName))
GO

(all three elements in the select statement are primary keys)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top