Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > LLBLGen Pro Runtime Framework> CallRetrievalStoredProcedure Problem
 

Pages: 1
LLBLGen Pro Runtime Framework
CallRetrievalStoredProcedure Problem
Page:1/1 

  Print all messages in this thread  
Poster Message
CliffH
User



Location:

Joined on:
03-May-2006 14:27:07
Posted:
52 posts
# Posted on: 11-Aug-2006 12:34:33.  
Can anyone please give me a quick response to a problem I've searched this site for answers to but with no success.

SQL Server 2000, Adapter. .NET 1.1

Calling CallRetrievalStoredProcedure, as in:-

public DataTable BookingSearch( string booking_ref, string websiteref, string client_firstname, string client_surname,
            string clientwebsiteemailaddress )
{
DataAccessAdapter adapter = new DataAccessAdapter();
...
...
tblResults = RetrievalProcedures.BookingSearch( booking_ref, websiteref, client_firstname, client_surname, clientwebsiteemailaddress);

Fails always when the adapter.Fill(tableToFill); line in CallRetrievalStoredProcedure is called.

Error is 'System.Data.SqlClient.SqlException'

The sproc is a straightforward SELECT query with optional parameters, which works with no problem when exec'd in Query Analyser.




  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37375 posts
# Posted on: 11-Aug-2006 13:13:09.  
What's the full exception given?

Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
CliffH
User



Location:

Joined on:
03-May-2006 14:27:07
Posted:
52 posts
# Posted on: 11-Aug-2006 13:41:30.  
An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in system.windows.forms.dll

Additional information: System error.

There nothing more than this in the trace output. I though it may be a permissions issue but I've checked EXEC permissions so I'm absolutely stuck.

Just tried a simple SELECT * FROM Table test and the call to this works OK so it must be something to do with the sproc itself.

  Top
CliffH
User



Location:

Joined on:
03-May-2006 14:27:07
Posted:
52 posts
# Posted on: 11-Aug-2006 14:06:56.  
Sproc has five parameters. Supplied values are optional and set to null when not supplied. But here's the last few lines of the exception

Unhandled Exception: System.Data.SqlClient.SqlException: Procedure 'BookingSearch' expects parameter '@websitereference', which was not supplied.
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)

When I run it with the first param it complains that the second paramater is not supplied. If I run it with the second parameter it tells me the first parameter is not supplied.

Unhandled Exception: System.Data.SqlClient.SqlException: Procedure 'BookingSearch' expects parameter '@booking_ref', which was not supplied.

Any idea what I'm doing wrong.



  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37375 posts
# Posted on: 12-Aug-2006 13:46:24.  
I think it's similar to the problem discussed in this thread:
http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=6959
Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.