CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 input parameters with stored procedures in CCS

Print topic Send  topic

Author Message
R Gorantla
Posted: 11/06/2002, 3:22 PM

Hi All,

I have been trying to use stored procedures (SQL Server 7.0) with CCS by selecting "Procedure" as the datasource for a grid.

1) The problem is that only input paremeters of date format are working in that they return data in design mode. If input parameter is char or int no data is being returned. The stored procs by themselves work fine and I have confirmed that using SQL Ananlyser.

2) Also, how do I make navigator work when I have stored procs as data sources.

Just wondering if anyone else has run into the same/similar problems or am I missing something here.

I tried using the following stored proc.

CREATE PROCEDURE spReturnEmployeeTrades

@StartDate datetime,
@EndDate datetime,
@employeeName varchar(100)

AS

Select TradeID,TradeDate,EmployeeName, AccountName, AccountNumber, BrokerID, SecurityCode, TransactionType, NoOfSecurities, SharePrice, TotalTradeValue,
TradeReason, ResearchInterest,CSAMAuthorised, BrokerConfirmRcvd
from tblTradeDetails
where
EmployeeName = @employeename and
TradeDate >= @StartDate and TradeDate <= @EndDate

order by employeeName, tradedate, securitycode

if @@error <> 0
RETURN 1
else
RETURN 0



I appreciate any help/pointers .

Thanks in advance.

R Gorantla
Nicole
Posted: 11/09/2002, 2:39 AM

Gorantla,
1. please make sure that the specified types of SP parameter match the types of the fields on the form. If the types are different it can cause the problem you faced with.

2. as for navigator, the only one Navigator type could be used. It is Simple type navigator with "Last" and "Total" links disabled.
R. Gorantla
Posted: 11/10/2002, 9:24 PM

Nicole,

Thanks for your pointers regarding using input parameters with stored procedures as data source for grids. I "Refresh" ed before "Review Data" and it worked.

With regards to using "Simple" Navigator with stored procs, I have tried without much luck. I have created a sample CCS project to illustrate the problem that I'm running into. I have used "Prev" and "Next" only and chosen "Simple" type of Navigator. The problem is that no hyperlinks are being shown with "Prev" and "Next".

I would really appreciate if you tell me how "Simple" Navigator works with stored procedures. I have a project in which I have a lot of grids which have stored procedures as data sources and I am trying to get the Navigator working.

Would you know of a working example so that I may have a look at the code and design.

Thanks in advance.

R. Gorantla.





Nicole
Posted: 11/12/2002, 7:26 AM

Hello,
I suggest the issue is related to SQL query using in SP.
I faced with similar problem while using sql query with "group by" clause.
R.Gorantla
Posted: 11/20/2002, 5:21 PM

Nicole,

I was wondering if you could help me with using input parameters when I have SQL as data source for a grid. I have attempted to do this by adding parameters and when i "Test" it says variable needs to be declared.

Also,do navigator liknks work with SQL as data source.
I noticed that Navigator does not work with Stored proc. apparently that is a bug in CCS.

Thanks in advance
R. Gorantla


   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.