Hello
I am experimenting with Crystal Reports and Progress Stored Procedures. I have created a simple stored procedure through Progress SQL Explorer ver. 10.0B. The procedure compiles and returns data. It works as expected.
Then, in WinXp, I am trying to set this procedure as a data source for Crystal Reports 10.0, trough ODBC Driver, and I am getting the following
error:
Query Engine Error:[DataDirect][ODBC OPENEDGE driver][OPENEDGE]Syntax error in SQL statement at or about "}" (10713)
I am including above mentioned stored procedure below:
------------------------------------------------------------------------
-
CREATE PROCEDURE odbcuser.getName1()
RESULT (
name CHARACTER(100)
)
BEGIN
String sname = "";
SQLCursor custcursor = new SQLCursor ( "select name from pub.customer"
) ;
custcursor.open ();
custcursor.fetch ();
while (custcursor.found())
{
sname = (String) custcursor.getValue(1, CHARACTER);
SQLResultSet.set (1, sname);
SQLResultSet.insert ();
custcursor.fetch();
}
custcursor.close ();
END;
commit;
--------------------------------------------------------------------
Could someone tell me what I am missing?
Any help is appreciated
I am experimenting with Crystal Reports and Progress Stored Procedures. I have created a simple stored procedure through Progress SQL Explorer ver. 10.0B. The procedure compiles and returns data. It works as expected.
Then, in WinXp, I am trying to set this procedure as a data source for Crystal Reports 10.0, trough ODBC Driver, and I am getting the following
error:
Query Engine Error:[DataDirect][ODBC OPENEDGE driver][OPENEDGE]Syntax error in SQL statement at or about "}" (10713)
I am including above mentioned stored procedure below:
------------------------------------------------------------------------
-
CREATE PROCEDURE odbcuser.getName1()
RESULT (
name CHARACTER(100)
)
BEGIN
String sname = "";
SQLCursor custcursor = new SQLCursor ( "select name from pub.customer"
) ;
custcursor.open ();
custcursor.fetch ();
while (custcursor.found())
{
sname = (String) custcursor.getValue(1, CHARACTER);
SQLResultSet.set (1, sname);
SQLResultSet.insert ();
custcursor.fetch();
}
custcursor.close ();
END;
commit;
--------------------------------------------------------------------
Could someone tell me what I am missing?
Any help is appreciated