|
Navigation: Programming Cookbook > Database Connectivity > Connecting to a Data Source > Supplying a Username and Password |
![]() ![]()
|
Although it is not necessary in this case, some data sources require a username and password to be supplied in order to connect. You can do this using the #uid: and #pwd: methods before making the connection.
c := (DBConnection new)
dsn: 'NWind';
uid: 'Tony';
pwd: 'alpha';
connect.