G
Ger
Hi,
I am using vs.net2003 on a sbs2003 with IIS6 and SQL2000.
In vb.net I created on the sbs2003-machine a Webservice. When running the
project locally, I got the asmx-page with the available Webwservices. When
running the Webservice without parameters I got a the end the right data, but
when I run the second Webservice (with a parameter) I was asked to type in
the parameter and after invoking I got the following error:
System.Data.SqlClient.SqlException: Prepared statement '(@Param int)SELECT
ID, Voornaam, Tussenvoegsel, Achternaam, Tite' expects parameter @Param,
which was not supplied.
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
at
System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
at AanzetWS.Service1.GetWZID(Int32 m_ID) in
C:\Inetpub\wwwroot\AanzetWS\Service1.asmx.vb:line 862
The code in my Webservice project looks like this:
<WebMethod()> _
Public Function GetWZVerkort() As dsWZVerkort
Dim ds As New dsWZVerkort
adapWZVerkort.Fill(ds)
Return ds
End Function
<WebMethod()> _
Public Function GetWZID(ByVal m_ID As Integer) As dsWZID
Dim ds As New dsWZID
adapWZID.Fill(ds)
Return ds
End Function
So the first function runs well and on the second function I got the error.
Why I got this error, while passing a (correct) parameter ?
Help is appreciated,
regards, Ger.
I am using vs.net2003 on a sbs2003 with IIS6 and SQL2000.
In vb.net I created on the sbs2003-machine a Webservice. When running the
project locally, I got the asmx-page with the available Webwservices. When
running the Webservice without parameters I got a the end the right data, but
when I run the second Webservice (with a parameter) I was asked to type in
the parameter and after invoking I got the following error:
System.Data.SqlClient.SqlException: Prepared statement '(@Param int)SELECT
ID, Voornaam, Tussenvoegsel, Achternaam, Tite' expects parameter @Param,
which was not supplied.
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
at
System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
at AanzetWS.Service1.GetWZID(Int32 m_ID) in
C:\Inetpub\wwwroot\AanzetWS\Service1.asmx.vb:line 862
The code in my Webservice project looks like this:
<WebMethod()> _
Public Function GetWZVerkort() As dsWZVerkort
Dim ds As New dsWZVerkort
adapWZVerkort.Fill(ds)
Return ds
End Function
<WebMethod()> _
Public Function GetWZID(ByVal m_ID As Integer) As dsWZID
Dim ds As New dsWZID
adapWZID.Fill(ds)
Return ds
End Function
So the first function runs well and on the second function I got the error.
Why I got this error, while passing a (correct) parameter ?
Help is appreciated,
regards, Ger.