Page 1 of 1

Three errors When connect ASE

Posted: Wed 26 May 2010 12:13
by cxg417
Three Errors when connect Sybase ASE

1.UniQuery1.RefreshRecord Raise 'Refresh failed. Found 0 records' When connect ASE

2.Exec 'Select * From Sysprocesses',FieldValue of Field=''

3.
Create DataBase1
Create table TableA(
ID1 varchar(10) not null,
Value1 varchar(50) null)

Create DataBase2
Create table TableB(
ID2 varchar(10) not null,
Value2 varchar(50) null)


DB: TUniConnection;
DB.DataBase:=DataBase1;

UniQuery1.Connection:= DB; UniQuery2.Connection:= DB;

Code Example:

UniQuery1.Close;
UniQuery1.SQL.Text:= 'select * from DataBase2..TableB';
UniQuery1.Open;


UniQuery2.Close;
UniQuery2.SQL.Text:= 'select * from TableA where ID1=:P_ID1';
UniQuery2.ParamByName('P_ID1').DataType:= ftString;
UniQuery2.ParamByName('P_ID1').ParamType:= ptInput;
UniQuery2.ParamByName('P_ID1').AsString:= 'A';
UniQuery2.Open; -->>raise "TableA not Found"
________
H platform

Posted: Thu 27 May 2010 09:15
by bork
Hello

Please provide the ASE database version and the exact name and version of your ODBC driver for Sybase ASE database.

Posted: Thu 27 May 2010 09:58
by cxg417
Hello.

Sybase Version: Adaptive Server Enterprise/12.5.2/EBF 11948 ESD#1/P/NT (IX86)/OS 4.0/ase1252/1838/32-bit/OPT/Sat May 29 03:34:29 2004

Sybase ASE ODBC Driver, TDS Version
Microsoft Windows 9x, NT, 2000, ME, XP
Version 4.20.0067 (12.5.1/P-EBF11786 ESD #02/04.20.0067)
March 2004
________
Strain Index

Posted: Mon 31 May 2010 12:00
by bork
Hello

I tried to reproduce your issue on the sybase ASE client and server with the 12.5.1 version. All works good. It seems like your ODBC driver for ASE 12.5.1 version is not compatible with ASE 12.5.2.

Try to download ODBC driver for ASE 12.5.2 and try again to connect and to execute your queries.