cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jlocke
Level 3

Error connecting to Oracle using SQLServerSelectLogin in Installscript MSI project.

Am getting "Error 27502. Could not connect to Oracle 'METER'. [Microsoft][ODBS driver for Oracle][Oracle]ORA-12203: TNS: unable to connect to destination (12203)"

This is on a Windows Server 2008 SP1 64-bit machine.

the Installer does the following (see code snippet at bottom):
Basically, SQLRTInitialize2 is called to bring up the SQL connection dialog to prompt for the DB, and ask for Userid and password. This works.
I believe the problem lies when SQLServerSelectLogin is called.

The installer -works- in a Windows Server 2003 32-bit environment.
Is there anything that needs changing for Server 2008 SP1 64-bit support??

I can successfully SQL plus to 'METER' on the machine, and also the ODBS connection it appears to be using does connect to Oracle OK.
Thanks. (code snippet below)

----
//---------------------------------------------------------------------------
// OnSQLLogin
//---------------------------------------------------------------------------
function number OnSQLLogin( nReturn )
string sDLL, sMessage;
string sHidden[MAX_PATH];
string sServer[MAX_PATH], sUser[MAX_PATH], sPassword[MAX_PATH], sAuth[10], sDB[MAX_PATH], sTemp[MAX_PATH];
string sConnectString[MAX_PATH+MAX_PATH+MAX_PATH+2];
number nResult, nSize, nRetVal;
BOOL bWinAuth, bDoneLogin;
begin
//MessageBox ("Got to OnSQLlogin", INFORMATION);
SQLRTInitialize2();
//First extract runtime dll
//sDLL = SUPPORTDIR ^ "ISSQLSRV.DLL";
//nResult = StreamFileFromBinary( ISMSI_HANDLE, "ISSQLSRV.DLL", sDLL );

//UseDLL( sDLL );
// JL Commented-out, per problem described here: http://community.macrovision.com/showthread.php?t=171504
//Get Default Properties
nSize = MAX_PATH;
MsiGetProperty( ISMSI_HANDLE, "IS_SQLSERVER_DIALOG", sTemp, nSize );
if( nSize > 0 ) then

//First add the Password property as a Hidden property
//so no passwords accidentally get logged.
nSize = MAX_PATH;
MsiGetProperty( ISMSI_HANDLE, "MsiHiddenProperties", sHidden, nSize );
if( StrLength( sHidden ) > 0 ) then
sHidden = sHidden + ";" ;
endif;
sHidden = sHidden + "IS_SQLSERVER_PASSWORD";
MsiSetProperty( ISMSI_HANDLE, "MsiHiddenProperties", sHidden );

//Now get Default properties
nSize = MAX_PATH;
MsiGetProperty( ISMSI_HANDLE, "IS_SQLSERVER_SERVER", sServer, nSize );
nSize = MAX_PATH;
MsiGetProperty( ISMSI_HANDLE, "IS_SQLSERVER_USERNAME", sUser, nSize );
nSize = MAX_PATH;
MsiGetProperty( ISMSI_HANDLE, "IS_SQLSERVER_PASSWORD", sPassword, nSize );

nSize = 10;
MsiGetProperty( ISMSI_HANDLE, "IS_SQLSERVER_AUTHENTICATION", sAuth, nSize );
if( sAuth = "1" ) then
bWinAuth = FALSE;
else
bWinAuth = TRUE;
endif;

nSize = MAX_PATH;
MsiGetProperty( ISMSI_HANDLE, "IS_SQLSERVER_DATABASE", sDB, nSize );

//Now we have defaults

bDoneLogin = FALSE;
while( !bDoneLogin )

//Show login dialog
nReturn = SQLServerSelectLogin( sServer, sUser, sPassword, bWinAuth );

if( nReturn = NEXT ) then

//place results from dialog in Property table
MsiSetProperty( ISMSI_HANDLE, "IS_SQLSERVER_SERVER", sServer );
MsiSetProperty( ISMSI_HANDLE, "IS_SQLSERVER_USERNAME", sUser );
MsiSetProperty( ISMSI_HANDLE, "IS_SQLSERVER_PASSWORD", sPassword );
//MessageBox ("sServer (OnSQLLogin): " + sServer, INFORMATION);
sConnectString = sUser + "/" + sPassword + "@" + sServer;

TextSubSetValue ( "", sConnectString, TRUE );

TextSubGetValue ( "", sTemp, FALSE, FALSE );
// MessageBox ("sConnectString (OnSQLLogin TextSubGetValue): " + sTemp, INFORMATION);




if( bWinAuth = TRUE ) then
sAuth = "0";
else
sAuth = "1";
endif;

MsiSetProperty( ISMSI_HANDLE, "IS_SQLSERVER_AUTHENTICATION", sAuth );

//test connection
MsiSetProperty( ISMSI_HANDLE, "IS_SQLSERVER_CA_SILENT", "0" );

nRetVal = SQLRTServerValidate( ISMSI_HANDLE );

nSize = MAX_PATH;
MsiGetProperty( ISMSI_HANDLE, "IS_SQLSERVER_STATUS", sTemp, nSize );

if( sTemp != "0" ) then

nSize = _MAX_PATH;
MsiGetProperty( ISMSI_HANDLE, "IS_SQLSERVER_STATUS_ERROR", sMessage, nSize );

if( nSize = 0 ) then
sMessage = SdLoadString( IDS_IFX_SQL_ERROR_LOGIN_FAILED );
endif;

MessageBox( sMessage, MB_OK );

else
bDoneLogin = TRUE;
endif;

else
//BACK was clicked, so we don't even try
bDoneLogin = TRUE;
endif;

endwhile;
-----
Labels (1)
0 Kudos
(1) Reply
jlocke
Level 3

Okay, after I called to follow-up on an incident, I learned IS does not support 64-bit SQL connections via the built-in SQL scripts view.

I believe this means none of the built-in Installscript SQL functions will work to connect to a 64-bit database.

Can someone verify this?

Perhaps I missed this in the Release Notes.
The Help does not indicate the SQL support is only 32-bit that I can find.
0 Kudos