I am trying to connect to D3 Database with MVSP java api. So far:
- I have downloaded the
mvapi.jar - added it in project
libfolder written the sample code for connection inside
mainmethodString url = "jdbc:mv:d3:hostname:portNo"; Properties props = new Properties(); props.setProperty("username", ""); props.setProperty("password", ""); String account = "AGCO"; String password = ""; MVConnection connection = null; try { // Getting error at this point connection = new MVConnection(url,props); MVStatement mvStatement = connection.createStatement(); connection.logTo(account,password); MVResultSet results = mvStatement.executeQuery(query); }
com.tigr.mvapi.exceptions.MVException: server error with errorCode 1023.
I checked the console but I'm not able to figure out the actual cause or whether I am entering the wrong username, password.
Please suggest what I am doing wrong.
First, you have to set a breakpoint or trace which function is throwing the errors. Then check the routes, (FileName) probably you will have much more experience than I do, but keep in mind that giving the full route ("account,filename," where the last comma is important) is never a bad idea while keep you safer and is mandatory if the filename is in a different account that you are logged to.
And like always please verify these things:
I hope this helps.