We cannot hep from that code:
private printcon pObj = new printcon()
private OdbcConnection connPrt = new OdbcConnection();
connPrt = new OdbcConnection(pObj.connection());
We do not know what printcon.connection is returning as a connection string - you haven't shown us that. And that is what the ODBC system is complaining about.
Run you program in the debugger. Put a breakpoint on the "connPrt = new OdbcConnection..." line, and step into the
pObj.connection
method. You should be able to work out what the problem is from there.