Fields in Stored Procedure does not appear in Crystal reports 2008.

hi,
I am now using crystal reports 2008 evaluation copy for 30 days. I am trying to create a stored procedure with parameter, here is my sample Stored Procedure code;
DELIMITER $$
DROP PROCEDURE IF EXISTS `puerto`.`SP_FindEmployees`$$
CREATE DEFINER=`root`@`localhost` PROCEDURE `SP_FindEmployees`(SIDNo VARCHAR(10))
BEGIN
     SELECT * FROM employees WHERE IDNo=SIDNo;
    END$$
DELIMITER ;
when i try to call the procedure in sqlyog here is my sample code;
CALL sp_findemployees('0000000001')
it is successfull, but when i try to  connect it with crystal reports 2008 I got no fields in my stored procedure andi got this error message ;
"Database Connector: 'HY00:[MySQL][ODBC 3.51 Driver][mysqld-5.1.33-community]incorect number of arguments for procedure puerto.sp_findemployees; expected 1, got 0 [Database vendor code: 1318]"
CR2008 was not asking a parameter values.
But when I try using stored procedure that i've made in MSSQL, CR2008 asking parameters and succefully created the reports needed.
My Objective is to make a stored procedure  in MySQL by using select statement and filter it with parameter(s) that I will pass and CR2008 will use this stored procedure.
i also try the view with this code below and it was successfull in CR2008.
DELIMITER $$
DROP VIEW IF EXISTS `puerto`.`ep_employees`$$
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `ep_employees` AS (SELECT `employees`.`IDNo` AS `IDNo`,`employees`.`FullName` AS `FullName` FROM `employees`)$$
DELIMITER ;

hi,
Crystal Reports 2008 and MySQL 5 , ODBC driver 3.5 and ODBC driver 5.1.
I use ODBC connector 3.5 because I got errors in ODBC drivers in 5.1.
Do you have step by step procedure for creating add command dialog box?
I try creating the add command dialog box
here's my sample sql statement i don't know if its correct because no data appearing in my crystal report
Select * from employees where idno=@IDNo
in Command Parameter Dialog Box
Parameter Name = @IDNo
Prompting Text = @IDNo
Value Type = String
DefaultValue = 0
thanks!

Similar Messages

  • A word document was emailed to me.  I can open the document without a problem.  Is there a way for me to type on the document.... to fill out the form?  When I click the fields, the virtual keyboard does not appear.

    A word document was emailed to me.  I can open the document without a problem on my iPad 2.   Is there a way for me to type on the document.... to fill out the form?  When I click the fields, the virtual keyboard does not appear.

    If you want to edit a word document then you will need an app on your iPad that supports word so that you can copy them to it via 'open in' e.g. Apple's Pages app or a third-party app such as Documents To Go or QuickOffice HD

  • Access DB (& .ldb file) does not close after crystal reports

    Post Author: mgold
    CA Forum: Crystal Reports
    Access DB (& .ldb file) does not close after crystal reports
    Hi! We have a VB application using Crystal Reports 6 that has worked successfully on hundreds of systems for over 10 years. Now, on one network, the application and access database does not close. It seems to hang on the [.Close] command.
    When we open the application an peruse the screens without opening up a report (using crystal reports), the application and access db closes fine. But as soon as we run a report and then close the report and try to close the application, the access db does not close. Many of the screens open the db and grab data from the access db, but it's only after running crystal reports that we have this problem. (Please see more information below.)
    Setup: Application and data (access 97 db) reside on a server in the same folder, but application shortcut is kicked off on client PC. Kicking off the shortcut on the client PC means that the image/process runs on the client PC (not on the server). In this problem case, the application shortcut is on a Windows XP Pro Version 2002 SP2 PC with the app & data on a Windows 2003 server. Users are local Admins on their PCs with "Full Control"over the directory and files on the server where the data (access 97 db) resides. This type of setup is typical and has worked without any problems for clients.
    The application is written in Visual Basic, using Crystal Reports 6 (using DAO). We close the recordset, set it to zero and then it hangs on closing the db (.Close command).
    A few key pieces of information:
    - The application closes fine if the app & data (access 97 db) are on a local PC. This includes closing fine if the application is run directly on the Windows 2003 server where the data is stored.
    - It worked on this client's network until sometime in the last few weeks.
    - One thing that changed is that the company is using VMWare on its servers. Not sure if they started using VMWare at the same time as it started failing. This may be unrelated. Possibly other things changed, but can't get any more information ... yet.
    - It works fine running the application from a Windows Vista PC with a user who is a domain admin.
    - The access db and application hang for about 10-20 minutes and then eventually closes. It appears that somehow
    Crystal Reports is keeping the db open, but I'm not sure why.The application doesn't quit and the database doesn't close even if I try to end the task with the Task Manager.
    - The Crystl32.ocx version being used is 8.0.0.4 (if that matters).
    - I copied 6 month old program files and database files to a test folder on the Windows 2003 server. It fails using these files that worked fine 6 months ago.
    Any ideas or help would be greatly appreciated! If you know of another good place to post this, please let me know.
    Thanks!
    - Mark

    Crystal doesn't support tables in HTML interpretation. 
    You can probably work your way around this by doing Replace() calls on the relevant tags.
    See:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233313337333033383334%7D.do
    The supported HTML tags are:
    " html
    " body
    " div (causes a paragraph break)
    " tr (causes only a paragraph break; does not
    preserve column structure of a table)
    " span
    " font
    " p (causes a paragraph break)
    " br (causes a paragraph break)
    " h1 (causes a paragraph break, makes the font bold
    & twice default size)
    " h2 (causes a paragraph break, makes the font bold
    & 1.5 times default size)
    " h3 (causes a paragraph break, makes the font bold
    & 9/8 default size)
    " h4 (causes a paragraph break, makes the font bold)
    " h5 (causes a paragraph break, makes the font bold
    & 5/6 default size)
    " h6 (causes a paragraph break, makes the font bold
    & 5/8 default size)
    " center
    " big (increases font size by 2 points)
    " small (decreases font size by 2 points if it's 8
    points or larger)
    " b
    " i
    " s
    " strike
    " u
    The supported HTML attributes are:
    " align
    " face
    " size
    " color
    " style
    " font-family
    " font-size
    " font-style
    " font-weight

  • Stored Procedure for displaying data in Crystal Reports

    Hi I am new to Oracle & Crystal Reports,so can any one please give me sample stored procedure to display data in Crystal report from Oracle by passing rwo input values.

    from site:-
    Crystal Reports will only support the return of a single refcursor from Oracle. Even the latest and greatest version 10 doesn't allow you to return more than one recordset at a time. You could add one more step to your procedure that would join up the output of the multiple refcursors into a PL/SQL table and then fetch the result set out through a single refcursor. That way you are using temporary space that will be cleaned up as soon as the connection is terminated and will only be returning a single refcursor

  • Field added to cobl does not appear in FB01 interface

    Hi!
    I have added OXK3 transaction and set this field as "Opt Entry", but the field does not appear in FB01 transaction.
    I've also tried "Req Entry" status for new field it gave no effect.
    How this field can be enabled in the interface of standard FI transactions?
    Thanks!

    Some questions
    -Did you solve your problem ?
    -Did you come through OSS <a href="https://service.sap.com/sap/support/notes/174413">Note 174413 - Customer-specific fields in new Enjoy transactions</a> ?
    Regards

  • How to create a stored procedure and use it in Crystal reports

    Hi All,
    Can anyone explain me how to create a stored procedure and use that stored procedure in Crystal reports. As I have few doubts in this process, It would be great if you can explain me with a small stored proc example.
    Thanks in advance.

    If you are using MSSQL SERVER then try creating a stored procedure like this
    create proc Name
    select * from Table
    by executing this in sql query analyzer will create a stored procedure that returns all the data from Table
    here is the syntax to create SP
    Syntax
    CREATE PROC [ EDURE ] procedure_name [ ; number ]
        [ { @parameter data_type }
            [ VARYING ] [ = default ] [ OUTPUT ]
        ] [ ,...n ]
    [ WITH
        { RECOMPILE | ENCRYPTION | RECOMPILE , ENCRYPTION } ]
    [ FOR REPLICATION ]
    AS sql_statement [ ...n ]
    Now Create new report and create new connection to your database and select stored procedure and add it to the report that shows all the columns and you can place the required fields in the report and refresh the report.
    Regards,
    Raghavendra
    Edited by: Raghavendra Gadhamsetty on Jun 11, 2009 1:45 AM

  • Get Error on using Stored Procedure to use it in Crystal Reports XI

    Post Author: Krüger
    CA Forum: Integrated Solutions
    Hello, I need your help please. I use Oracle 10 and now write a correct compiled stored procedure: this procedure is really simple how you can see:set pagesize 50000set linesize 1000set wrap offset head offset feedback offset trimspool onset serveroutput onset verify offcreate or replace procedure GetFirmenNachMontag is  lutype varchar2(10);BEGINDECLAREbegin lutype:='Test';  dbms_output.put_line(lutype);END;END; In using in sql directly it is really all fine. But when I want to integrat it in a simple report in Crystal I get the error unknow databank connector error. I hope that somebody can help me please. With best regardsM.Krüger 

    If you are using MSSQL SERVER then try creating a stored procedure like this
    create proc Name
    select * from Table
    by executing this in sql query analyzer will create a stored procedure that returns all the data from Table
    here is the syntax to create SP
    Syntax
    CREATE PROC [ EDURE ] procedure_name [ ; number ]
        [ { @parameter data_type }
            [ VARYING ] [ = default ] [ OUTPUT ]
        ] [ ,...n ]
    [ WITH
        { RECOMPILE | ENCRYPTION | RECOMPILE , ENCRYPTION } ]
    [ FOR REPLICATION ]
    AS sql_statement [ ...n ]
    Now Create new report and create new connection to your database and select stored procedure and add it to the report that shows all the columns and you can place the required fields in the report and refresh the report.
    Regards,
    Raghavendra
    Edited by: Raghavendra Gadhamsetty on Jun 11, 2009 1:45 AM

  • Sub Report not working in Crystal Report 2008 using JSP

    I am having developer license of Crystal Report 2008. I am able to generate report using Java JDK 1.5 , JSP,Oracle10g , deployed on WebSphere Application Server 6.1.0.29. I am not able to generate Sub reports. Can you please help us with sample code to how to call and configure subreport and please send configuration CRConfig.xml.
    The below Error is Occurred on generating report.
    On condition when we link the main report to subreport through parameter.
    com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: java.lang.NullPointerException---- Error code:-2147467259 Error code name:failed
                    at com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(SourceFile:741)
                    at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(SourceFile:167)
                    at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.a(SourceFile:529)
                    at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.call(SourceFile:527)
                    at com.crystaldecisions.reports.common.ThreadGuard.syncExecute(SourceFile:102)
                    at com.businessobjects.reports.sdk.JRCCommunicationAdapter.for(SourceFile:525)
                    at com.businessobjects.reports.sdk.JRCCommunicationAdapter.int(SourceFile:424)
                    at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(SourceFile:352)
                    at com.businessobjects.sdk.erom.jrc.a.a(SourceFile:54)
                    at com.businessobjects.sdk.erom.jrc.a.execute(SourceFile:67)
                    at com.crystaldecisions.proxy.remoteagent.RemoteAgent$a.execute(SourceFile:716)
                    at com.crystaldecisions.proxy.remoteagent.CommunicationChannel.a(SourceFile:125)
                    at com.crystaldecisions.proxy.remoteagent.RemoteAgent.a(SourceFile:537)
                    at com.crystaldecisions.sdk.occa.report.application.ds.a(SourceFile:186)
                    at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(SourceFile:1558)
                    at com.crystaldecisions.sdk.occa.report.application.ReportSource.getPage(SourceFile:767)
                    at com.crystaldecisions.sdk.occa.report.application.AdvancedReportSource.getPage(SourceFile:324)
                    at com.crystaldecisions.reports.reportengineinterface.JPEReportSource.getPage(SourceFile:149)
                    at com.businessobjects.report.web.event.s.a(SourceFile:158)
                    at com.businessobjects.report.web.event.s.a(SourceFile:127)
                    at com.businessobjects.report.web.event.bt.a(SourceFile:47)
                    at com.businessobjects.report.web.event.bw.broadcast(SourceFile:93)
                    at com.businessobjects.report.web.event.am.a(SourceFile:53)
                    at com.businessobjects.report.web.a.t.if(SourceFile:2104)
                    at com.businessobjects.report.web.e.a(SourceFile:300)
                    at com.businessobjects.report.web.e.a(SourceFile:202)
                    at com.businessobjects.report.web.e.a(SourceFile:135)
                    at com.crystaldecisions.report.web.ServerControl.a(SourceFile:607)
                    at com.crystaldecisions.report.web.ServerControl.processHttpRequest(SourceFile:342)
                    at com.ibm._jsp._CrystalReportViewer._jspService(_CrystalReportViewer.java:107)
                    at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:87)
                    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
                    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1143)
                    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:591)
                    at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:481)
                    at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:122)
                    at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:226)
                    at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionProcessor.handleRequest(AbstractJSPExtensionProcessor.java:286)
                    at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3453)
                    at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:267)
                    at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:815)
                    at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1466)
                    at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:119)
                    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
                    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
                    at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
                    at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
                    at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
                    at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
                    at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
                    at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:196)
                    at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:751)
                    at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:881)
                    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473)
    Caused by: java.lang.NullPointerException
                    at oracle.jdbc.driver.OracleResultSetMetaData.<init>(OracleResultSetMetaData.java:84)
                    at oracle.jdbc.driver.ScrollableResultSet.getMetaData(ScrollableResultSet.java:1282)
                    at com.crystaldecisions.reports.common.data.JdbcCrystalResultSet.getMetaData(Unknown Source)
                    at com.businessobjects.reports.jdbinterface.common.ResultSetReader.bindToField(Unknown Source)
                    at com.crystaldecisions.reports.queryengine.ResultSetRecordReader.a(SourceFile:80)
                    at com.crystaldecisions.reports.queryengine.Rowset.a(SourceFile:1107)
                    at com.crystaldecisions.reports.queryengine.Rowset.z9(SourceFile:1025)
                    at com.crystaldecisions.reports.queryengine.Rowset.Aa(SourceFile:988)
                    at com.crystaldecisions.reports.queryengine.Rowset.z3(SourceFile:967)
                    at com.crystaldecisions.reports.queryengine.Rowset.bL(SourceFile:533)
                    at com.crystaldecisions.reports.queryengine.Rowset.zM(SourceFile:245)
                    at com.crystaldecisions.reports.queryengine.RowsetBase.zA(SourceFile:156)
                    at com.crystaldecisions.reports.queryengine.QueryInfo.vE(SourceFile:261)
                    at com.crystaldecisions.reports.datafoundation.DFQuery.for(SourceFile:628)
                    at com.crystaldecisions.reports.datalayer.a.do(SourceFile:1621)
                    at com.crystaldecisions.reports.datalayer.a.a(SourceFile:1404)
                    at com.crystaldecisions.reports.dataengine.m.b(SourceFile:334)
                    at com.crystaldecisions.reports.dataengine.j.b(SourceFile:515)
                    at com.crystaldecisions.reports.dataengine.m.o(SourceFile:408)
                    at com.crystaldecisions.reports.dataengine.m.a(SourceFile:173)
                    at com.crystaldecisions.reports.dataengine.ContextNode.a(SourceFile:114)
                    at com.crystaldecisions.reports.dataengine.ContextNode.a(SourceFile:95)
                    at com.crystaldecisions.reports.dataengine.j.case(SourceFile:1080)
                    at com.crystaldecisions.reports.dataengine.h.<init>(SourceFile:108)
                    at com.crystaldecisions.reports.dataengine.DataContext.a(SourceFile:254)
                    at com.crystaldecisions.reports.dataengine.DataProcessor2.a(SourceFile:4660)
                    at com.crystaldecisions.reports.dataengine.DataProcessor2.a(SourceFile:4574)
                    at com.crystaldecisions.reports.dataengine.DataProcessor2.new(SourceFile:2652)
                    at com.crystaldecisions.reports.dataengine.DataProcessor2.byte(SourceFile:2610)
                    at com.crystaldecisions.reports.dataengine.DataProcessor2.try(SourceFile:2282)
                    at com.crystaldecisions.reports.dataengine.DataProcessor2.int(SourceFile:2442)
                    at com.crystaldecisions.reports.dataengine.DataProcessor2.I(SourceFile:1013)
                    at com.crystaldecisions.reports.dataengine.DataProcessor2.if(SourceFile:4816)
                    at com.crystaldecisions.reports.dataengine.DataProcessor2.a(SourceFile:2020)
                    at com.crystaldecisions.reports.formatter.formatter.objectformatter.ObjectFormatter.a(SourceFile:309)
                    at com.crystaldecisions.reports.formatter.formatter.objectformatter.ObjectFormatter.a(SourceFile:250)
                    at com.crystaldecisions.reports.formatter.formatter.objectformatter.u.a(SourceFile:922)
                    at com.crystaldecisions.reports.formatter.formatter.objectformatter.u.e(SourceFile:784)
                    at com.crystaldecisions.reports.formatter.formatter.objectformatter.u.for(SourceFile:242)
                    at com.crystaldecisions.reports.formatter.formatter.objectformatter.aa.a(SourceFile:64)
                    at com.crystaldecisions.reports.formatter.formatter.objectformatter.ObjectFormatter.a(SourceFile:243)
                    at com.crystaldecisions.reports.formatter.formatter.objectformatter.ObjectFormatter.a(SourceFile:210)
                    at com.crystaldecisions.reports.formatter.formatter.objectformatter.v.a(SourceFile:185)
                    at com.crystaldecisions.reports.formatter.formatter.objectformatter.v.a(SourceFile:230)
                    at com.crystaldecisions.reports.formatter.formatter.objectformatter.ai.for(SourceFile:359

    I'm not sure I understand what you mean by tabbed reporting.  Do you mean having multiple reports open at once within the Crystal Reports Designer?
    If this is the case, the viewer is designed to only have one report open at a time.

  • Danish character and Symbol are not displaying in crystal report 2008

    I am developing a crystal report. The report displays data from database. The data is entered into database from a asp.net web form where a JavaScript Editor is used. Mainly data is saved in Danish character and also there are some emotion symbol. The web page is showing these data reading from database perfectly. But the Crystal Report is missing some Danish character as well as emotion symbol in some cases. The screen print both for web page and crystal report is shown bellow.  The database field DataType is “CLOB” and using Crystal Report 2008.
    Can anyone help me to get rid of this situation.
    Thanks to you all.

    Please have a look at the resolution in this thread:
    CR 2008 - Oracle 11g - CLOB fields are blank when using command
    -Abhilash

  • Stored Procedure Does Not Run Properly When Called From Portlet

    We have a simple Java portlet that calls a PL/SQL stored procedure which we wrote. The stored procedure sends a large number of emails to users in our corporation using the "utl_smtp" package. The stored procedure returns a count of the emails back to the Java portlet when it's finished. This number is displayed in the portlet.
    Our problem:
    The stored procedure functions as expected when run from a PL/SQL block in SQL*Plus, and the Java portlet calls the procedure properly when sending out a smaller number of emails (Less than 200 usually). When we get into a higher number of emails the procedure hangs when called from the portlet, but it STILL functions properly from SQL*Plus. It does not return the number of emails sent
    and the Java portlet is unable to return a SQLException. Also, we have noticed that emails are sent at a much slower pace from the stored procedure when it's called from the portlet.

    Any Ideas?

  • Report with Stored Procedure does not return until refresh

    I'm using RAS server 2008 to run many Crystal reports from a web application (TrackWise) over Oracle 10g DB.
    A new report is using a stored procedure that takes several minutes (5-10) to return before the rest of the report's SQL can execute.
    When running the report from Crystal Developer there is no problem,
    but when running from the application (using the RAS), the report seems to be running forever,
    However, if you wait a few minutes for the DB utilization to drop (i.e. for the stored procedure to finish) and refresh - the full report appears on the screen in a second.
    Since I have many other reports that run for much longer time with no issue, I assume that this has nothing to do with the web application, but rather related to the connection between the RAS and the DB (i.e. the idle time between the beginning of the stored procedure execution to its return and the continuation of the report creation).
    I assume that I need to change one of the RAS settings/ parameters (in the properties or in the registry), but which?
    Please assist.

    Since this app is from TrackWise, I'd recommend contacting TrackWise and see if they have an answer for you. As it is, we have no idea how they implemented the CR components in their app. If they cannot help you, it should be them coming here and asking us - or better yet they should be creating a phone incident.
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow us on Twitter

  • The link to a user defined oracle stored procedure does not work

    This is based on the HowTo Download a file
    http://otn.oracle.com/products/database/htmldb/howtos/howto_file_upload.html
    I have given a link to a procedure as follows, which will download the file (as given in the HowTo):
    #OWNER#.download_my_file?p_file=#ID#.
    However, this does not work. It tries to open a page rather than executing the procedure. It displays the page not found message

    that page not found message is a generic one. you'd want to check your apache logs for more info on what really happened. my guess is that you missed step 5 of that how-to, "grant execute on download_my_file to public"
    hope this helps,
    raj

  • In contacts the country field of the address does not appear in the print pre view or or in the printed label. any suggestions  why or who to correct ?

    In contacts on my new i Mac the country field does not show in the label print pre view or the printed label.
    Any suggestion of why this is happening?

    I have found a solution - no bug. See this link
    Address book

  • Stored procedure does not work!

    okay, this is one of the weirdest things i have ever seen...so i have created a registration page to my code which on submit it will fire the following codes
    protected void btsSubmit_Click(object sender, EventArgs e)
    if (tbxFName.Text.Trim().Length == 0 || tbxLName.Text.Trim().Length == 0 || tbxUsername.Text.Trim().Length == 0 || tbxPassword.Text.Length == 0)
    ScriptManager.RegisterStartupScript(this, this.GetType(), "myscript", "ShowNotification('Warning','Please fill the required textboxes');", true);
    else
    try
    string conString = ConfigurationManager.ConnectionStrings["IRELDBCS"].ConnectionString;
    using (SqlConnection con = new SqlConnection(conString))
    SqlCommand sc = new SqlCommand("spUserRegister", con);
    sc.CommandType = CommandType.StoredProcedure;
    sc.Parameters.AddWithValue("@a", tbxFName.Text.Trim());
    sc.Parameters.AddWithValue("@b", tbxLName.Text.Trim());
    sc.Parameters.AddWithValue("@c", tbxUsername.Text.Trim());
    sc.Parameters.AddWithValue("@d", tbxPassword.Text);
    sc.Parameters.AddWithValue("@e", ddlUserType.SelectedValue);
    con.Open();
    int ReturnCode = (int)sc.ExecuteScalar();
    if (ReturnCode == -1)
    ScriptManager.RegisterStartupScript(this, this.GetType(), "myscript", "ShowNotification('Error','This user is already exists.');", true);
    else
    ScriptManager.RegisterStartupScript(this, this.GetType(), "myscript", "ShowNotification('Success','you registration was successful');", true);
    catch
    ScriptManager.RegisterStartupScript(this, this.GetType(), "myscript", "ShowNotification('Error','Something went wrong, please try again in a few minutes');", true);
    i was using sc.ExecuteNonQuery(); instead of int ReturnCode = (int)sc.ExecuteScalar();
    and it was working fine and it was functioning till i have added the part which it stops user from registering with the same email address which is 
    int ReturnCode = (int)sc.ExecuteScalar();
    if (ReturnCode == -1)
    ScriptManager.RegisterStartupScript(this, this.GetType(), "myscript", "ShowNotification('Error','This user is already exists.');", true);
    else
    ScriptManager.RegisterStartupScript(this, this.GetType(), "myscript", "ShowNotification('Success','you registration was successful');", true);
    and this is my stored procedure
    USE [dbo.IrELearn]
    GO
    /****** Object: StoredProcedure [dbo].[spUserRegister] Script Date: 04/01/2014 19:35:08 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    ALTER PROCEDURE [dbo].[spUserRegister]
    @a nvarchar(30),
    @b nvarchar(50),
    @c nvarchar(150),
    @d nvarchar(30),
    @e smallint
    as
    BEGIN
    declare @Count int
    declare @ReturnCode int
    SELECT @Count = COUNT(Username)
    FROM tbl_Users WHERE Username = @C
    IF @Count > 0
    Begin
    Set @ReturnCode = -1
    End
    Else
    Begin
    Set @ReturnCode = 1
    INSERT INTO tbl_Users (FirstName, LastName, Username, Password, UserType) VALUES (@a,@b,@a,@b,@e)
    End
    SELECT @ReturnCode as ReturnValue
    END
    now users cant register anymore and when i tried to debug and find where the problem is, it completely skips the "if" section after 
    int ReturnCode = (int)sc.ExecuteScalar();
    im not sure whats goin on!! can anyone find out what the problem is?
    thank you in advance

    Can you try to replace the statement in the Stored Proc
    SELECT @ReturnCode as ReturnValue
    with
    RETURN @ReturnCode
    The SELECT statement returns the value as a dataset but the RETURN statement returns it as a Return Code for success/failure of the Stored Proc execution.
    Normally RETURN(0) i.e. a zero is returned as a default for success and a non-zero value is returned for a failure. But don't obther about the values at this time, just try the RETURN statement.
    - Aalam | (Blog)

  • How to use a stored procedure as a datasource in Crystal Report for Eclipse

    Hi All,
    I've written a stored procedure in oracle 10g with few input parameters and one refcursor output parameter. I want to use this stored procedure as a data source for creating a report in "Crystal Report For Eclipse 3.6.0".
    When I tried to add this stored procedure to the report using the connection explorer, I don't see any option to do this. But when I try to add any table, it shows options like "Add to the current report"....
    Can anybody assist me how to use a stored procedure as a data source in "Crystal Report For Eclipse"?
    Which driver should I use to connect to the oracle database? I tried using JDBC Driver for Oracle.
    Thanks in advance.

    Did you solve your problem? How did you do?

Maybe you are looking for

  • Dump while copying the entries in view cluster

    Hi Experts, I am having a scenario where i am getting the dump while copying the entries through the vies cluster. I have 2 tables CU00 and CU01. CU01 is depended on CU00. CU00- it is having schema which are defined by the user.(SCHEMA-P,DESC) CU01-

  • I want to get a hard case for my macpro.. Is this a hard case or silicon? Speck 13" SeeThru Satin Case for MacBook Pro and MacBook

    I want to get a hard case for my macpro.. Is this a hard case or silicon? Speck 13" SeeThru Satin Case for MacBook Pro and MacBook. Says hard cse but then easy to grip...anyone have one?

  • Copy number ranges...

    Hi Where we can copy number ranges for document types in SEM-BCS. Any specific T.code...

  • How to update MUSE to latest version?

    I am trying to update my version of MUSE CC. AAM is telling me it's up to date but I know there's a newer version. I have tried uninstalling and reinstalling but it's still not the latest version. How can I install the latest version?

  • Bug using map field?

    I have a table AMOUNTS that contains a foreign key into another table LOAN. The primary key column name in LOAN is LOAN_SK and the foreign key column to this in the AMOUNTS table is called LOAN_FK. In my .jdo file for my LOAN class I have this: <fiel