Skip to content

Commit b6ca836

Browse files
committed
connection string has been simplified
1 parent d81c498 commit b6ca836

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

worldcities.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
# handle database request and query city information
2626
def city(name=None):
2727
# connect to DB2
28-
db2conn = ibm_db.connect("DATABASE="+db2cred['db']+";HOSTNAME="+db2cred['hostname']+";PORT="+str(db2cred['port'])+";UID="+db2cred['username']+";PWD="+db2cred['password']+";","","")
28+
db2conn = ibm_db.connect(db2cred['ssldsn'], "","")
2929
if db2conn:
3030
# we have a Db2 connection, query the database
3131
sql="select * from cities where name=? order by population desc"

0 commit comments

Comments
 (0)