c - Connection string to a remote DB2 db in another server -


i'm trying figure out connection string connect remote db2 using c db2 api (and odbc). far i've tried different options without success. documentation not clear @ second parameter of sqlconnect when defining data base name.

sqlconnect(hdbc, "hostname/dbname", sql_nts, "user", sql_nts, "pass", sql_nts); sqlconnect(hdbc, "hostname:dbname", sql_nts, "user", sql_nts, "pass", sql_nts);  // jdbc format... sqlconnect(hdbc, "odbc:db2://hostname/dbname", sql_nts, "user", sql_nts, "pass", sql_nts); 

thanks!

the sqlconnect() function doesn't allow specify remote host details in servername parameter. can specify database alias name here. if database on remote server, need set connection parameters via db2 client (using catalog node , catalog database commands).

however, can use sqldriverconnect() function , specify full details in connection string trying do.


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -