Sybase SQL Anywhere 5.0 and Delphi problems 
Author Message
 Sybase SQL Anywhere 5.0 and Delphi problems

Hi All,

This is the first time I've posted anything to a newsgroup.  Please bear with
me if its not all OK.  I've attempted to send this information to Borland via
their bug-reporting Web page, but it doesn't work.  I have also reported some
of these problems to Sybase (who have been kind enough to respond, well done to
them).

I am using Sybase SQL Anywhere 5.0 (at the moment stand-alone engine) via ODBC.
Is anyone else using SQL Anywhere with delphi ???

There are four problems, all relating to TStoredProc and stored procedures, plus
one other :-

1) When accessing a stored procedure that has the following syntax -

**************
   create procedure GET_ITEMS ()
   result (firstItem integer, secondItem integer)
   begin
      select ITEM_1, ITEM_2
      from ITEM_TABLE
   end
**************
I get an 'Error creating cursor handle' exception when calling the Open method
of the associated TStoredProc component.  This previously used to work fine
with Watcom SQL 4.0 (which is the predecessor the SQL Anywhere 5.0)

2) Same set up as before, but with a stored procedure that either has a
parameter list with char or varchar as the first parameter, or a bit type
parameter anywhere in the list, e.g

create procedure (in firstString char(32), in anInteger integer)  or
create procedure (in something integer, in aBit bit, in somethingelse char(16))

then when using the parameters editor while designing the TStoredProc
component I get a GPF in the IDAPI ODBC driver --->  IDODBC01.DLL.
This makes it impossible to set up the parameter list and the types of
parameters.

3) When using a TStoredProc with a procedure with output parameters,

e.g. create procedure outputTest (in inputValue integer, out outputValue integer)

the output value is never (ever) returned, neither with WatcomSQL 4.0 nor
with Sybase SQL Anywhere 5.0, e.g.

  ExecProc;
  x := ParamByName ('outputValue');

x is always zero.

4) When using a stored procedure that is defined as a function, eg.

**************
   create function TEST ()
   returns integer
   begin
      return (100);
   end
**************

I find that when using the parameters editor, it says there is a parameter
called TEST, and when I set it's type as result, and data type as integer, when
the ExecProc method runs, I get a "General SQL error. [Microsoft][ODBC DLL]
invalid parameter type" exception.  Changing the parameter type to output gives
a "General SQL error. [Sybase][ODBC Driver]" exception.

The upshot of all this is that I can only use stored procedures that have input
parameters only, not very satisfactory.

5) I have two separate databases, but with a number of identical tables in each.
I have two TTable components, one associated with a table in the one database,
and one associated with the identical table in the second database.  I now set
up a TBatchMove component to move data across from the source database table to
the destination database table. (mode = batAppend).  It all works fine for tables
with now foreign keys, but when there is a foreign key referencing another table,
the TBatchMove raises an exception 'key violation'.  It does this consistently
with only the third and fourth records which it fills in the destination database
table with garbage (which is why the key violation occurs), but all the other
records are transferred across OK.  The garbage records always have the same
data in them.

Does anyone have any suggestions, answers (Steve Koterski at Borland) ????

Thanks,

Steve Langridge




Sat, 25 Jul 1998 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. DELPHI with SYBASE SQL ANYWHERE------ DELPHI with SYBASE SQL ANYWHERE

2. Form Venezuela: Problem With ReportSmith 3.0 and Sybase SQL Anywhere 5.0

3. Delphi Developer 2.0 and Sybase SQL Anywhere 5.0

4. Sybase SQL-Anywhere 5.0 and Memo-fields

5. Sybase SQL Anywhere 5.0

6. HELP! ODBC Connetion to Sybase SQL Anywhere 5.0

7. delphi 2.01 and sybase sql anywhere problem

8. Delphi 3 SQL problem with Sybase Anywhere 5.5

9. Sybase SQL Anywhere, SQL Links and Delphi 2.0

10. Sybase SQL Anywhere (Watcom SQL) and Delphi

11. D4 / Sybase SQL Anywhere / Adaptive Server Anywhere 6.0

12. Problem with Sybase SQL Anywhere!!!

 

 
Powered by phpBB® Forum Software