Search code examples
sqlsap-asevisual-foxprofoxpro

Connect foxpro to sybase ASE


i'm trying to connect to Sybase ASE 11.5 / 12.5 from visual foxpro 5.0 or 9.0 but I can't make it work. I already connect foxpro to MSSQL using the following string.

conexion = "Driver=SQL Server;server=" + lcServidor + ";uid=" + lcUsuarioSQL + ";pwd=" + lcPass + ";database=" + ALLTRIM(lcBaseDatos)

Nevertheless, if I change the string to a Sybase one; eg:

"Driver={SYBASE ASE ODBC Driver};Srvr=Aron1;Uid=username;Pwd=password"

SQLSTRINGCONNECT(conexion) returns bad code / error

Any ideas?

Thanks in advance!


Solution

  • I re-installed my ASE12.5 drivers and worked using the following string.

    conexion = "Driver={SYBASE ASE ODBC Driver};NA=HOSTNAME,PORTNUMBER;Uid=USER;Pwd=PASSWORD;"

    Thanks!