Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DSN LESS CONNECTION FOR SYBASE 15.5

Status
Not open for further replies.

gy2cool

Programmer
Oct 20, 2010
16
IN
Dear friends,

I am using Powerbuilder 12. i wanted to know to connected the sybase database without using DSN creation.
Can any one give me the script for that.
 
I write following code it working find but only problem is coming on pop up window is coming after clicking on ok button in pop up window it will connect to database.
How can i remove pop window.please help me.


SQLCA.DBMS = 'ODBC'

SQLCA.DBParm &
= "ConnectString='Provider = SYC;Driver={SYBASE ASE ODBC Driver};" &
+ "Servername=pius;UID=test_sa;PWD=password123;Database=dist_test;ConnectOption='SQL_DRIVER_CONNECT,SQL_DRIVER_NOPROMPT'"
//+ "AutoStop=No;Integrated=No;" &
// + "CommLinks=SharedMemory,TCPIP{HOST=tsunami;DOBROAD=NONE};" &
// + "ConnectOption='SQL_DRIVER_CONNECT,SQL_DRIVER_NOPROMPT'"

CONNECT USING SQLCA;

IF SQLCA.SQLCODE <> 0 THEN
MessageBox ( 'Error', &
'CONNECT failed in open:' &
+ '~r~nSQLCode = ' &
+ String ( SQLCA.SQLCode ) &
+ '~r~nSQLDBCode = ' &
+ String ( SQLCA.SQLDBCode ) &
+ '~r~n' &
+ SQLCA.SQLErrText )
RETURN
END IF


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top