Re: Migration between NewEra2.x and NewEra3.0
Posted in 1997
Try a database statement. eg. VARIABLE l_dataBaseName CHAR(*) = "test@someServerName" DATABASE l_databaseName I have found that set isolation dirty read only works if you connect in this way. On 22 Jul 1997 07:23:09 -0400, dbonnici@ptl.com.mt (David Bonnici) wrote: >Hi all... > >I need to convert a NewEra v2.x app to NewEra v3. I managed to get >through the SYSPG migration utility so therefore I have a nice project >created just for me to compile. > >Compilation is ok. However at execution time, I get a "Database Connect >Failure" error. Here is my main block (which is generated by the WP) > >MAIN >VARIABLE eResult SMALLINT > CALL ixSQLConnect::getImplicitConnection() returning ixConn_Connection > IF ixConn_Connection IS NULL THEN > LET eResult = MESSAGEBOX( > NEW ixString( "Database Connect Failure" ), > NEW ixString( "Implicit connection failed" ), > ixStopIcon, ixOK) > CALL ixApp::exit() > END IF > DISPLAY ixConn_Connection.getConnectionType() --- THIS DISPAYS >a '1' > IF ixConn_Connection.getConnectionType() = 1 THEN > CALL ixConn_Connection.connect("wenza") > DISPLAY "wenza" --- Ok.. passes through here > ELSE > CALL ixConn_Connection.connect("data") > END IF > IF ixConn_Connection.getODBCErrorCode() <> ixSQLConnect::SQL_Success >THEN > DISPLAY ixConn_Connection.getODBCErrorCode() --- >DISPLAYS a -1 !?! > LET eResult = MESSAGEBOX( > NEW ixString( "Database Connect Failure" ), > NEW ixString( "Could not open database" ), > ixStopIcon, ixOK) > CALL ixApp::exit() > END IF > LET LspprWN = NEW LSpprWindow() > CALL LspprWN.open() > RETURN >END MAIN > >Note that the ixConn_Connection is defined as being of type >ixSQLConnect. >'wenza' is the name of the ODBC connection which is 'pointing' to >database 'data' > >What can I do to get this to connect ? > > > >David