This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- SQL Authntication Problem
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Mar 09, 2009
03:39 AM
SQL Authntication Problem
Hi Guyz,
I am trying to instal MSDE with the following paramaters.
/qn INSTANCENAME=APEOS SAPWD=xerox SQLCOLLATION=SQL_Latin1_General_CP1_CI_AI ADDLOCAL=All SECURITYMODE=SQL DISABLENETWORKPROTOCOLS=0
But I always get "Error 27502. Could not connect to Microsoft SQL Server (local)/APEOS. [DBNETLIB][ConnectionOpen(Connect()]SQL Server does not exist or Access Denied. (17).
But, the strange part of it is When I run it for second time, installation goes through smoothly.
I changed Inscript Exceution of ISSQLSERVERINSTALL and ISSQLSERVERUNINSTALL custom action to Deferred Exceution, but the error doesnot go away.
At the point of eroor, APEOS SQL service wwasnt listed in the windows services.
There might be something wrong with my script . I am posting it for reference.
Looking forward for response 🙂
//First initialize SQL Server runtime
SQLRTInitialize2();
// Suppress ISSQLSRV.DLL to show a connection error message.
MsiSetProperty( ISMSI_HANDLE, "IS_SQLSERVER_CA_SILENT", "1" );
//Get the names of all the necessary connections
listConnections = SQLRTGetConnections();
ListGetFirstString (listConnections, szConnection);
nCount = 0;
//determine if NEXT or BACK will be returned
//if there are no connections to make
if( nBtn != BACK ) then
bNext = TRUE;
else
bNext = FALSE;
//start at end if going BACK
while (ISERR_SUCCESS = ListGetNextString( listConnections, szConnection ) );
nCount++;
endwhile;
endif;
// Login for each connection
while (nResult = ISERR_SUCCESS)
//Get Default values for connection
SQLRTGetConnectionInfo( szConnection, szServer, szDB, szUser, szPassword );
bWinLogin = SQLRTGetConnectionAuthentication( szConnection );
// Display login dialog (without connection name)
// COMMENT OUT TO SWAP DIALOGS
// nResult = SQLServerSelectLogin2( szConnection, szServer, szUser, szPassword, bWinLogin, szDB, FALSE, TRUE );
// if (nResult = BUTTON_BACK) goto Dlg_SdWelcome;
Dlg_SdWelcome:
szTitle = "";
szMsg = "";
nResult = SdWelcome(szTitle, szMsg);
Dlg_CustomDlg:
nResult= TypeOfServer();
if nResult=BACK then
goto Dlg_SdWelcome;
elseif nResult=1 then
nResult = SQLServerSelectLogin2( szConnection, szServer, szUser, szPassword, bWinLogin, szDB, FALSE, TRUE );
if (nResult = BUTTON_BACK) goto Dlg_CustomDlg;
//if( bNext ) then
// write to ini file
szSectionName = "APEOS_CORE";
szKeyName = "APEOS_SERVER";
EXAMPLE_INI = "C:\\windows\\apeos_core.ini";
// Replace szOrigValue with szReplaceValue.
WriteProfString(EXAMPLE_INI, szSectionName, "APEOS_SERVER", "");
WriteProfString(EXAMPLE_INI, szSectionName, "APEOS_ADMIN", "");
WriteProfString(EXAMPLE_INI, szSectionName, "APEOS_PASS", "");
WriteProfString(EXAMPLE_INI, szSectionName, "DEBUG_OCR", "");
WriteProfString(EXAMPLE_INI, szSectionName, "LOG_DIR", "");
WriteProfString(EXAMPLE_INI, szSectionName, "INSTALL_DIR", "");
WriteProfString(EXAMPLE_INI, szSectionName, "TYPEOFIGA", "");
AddProfString(EXAMPLE_INI, szSectionName, "APEOS_SERVER", szServer);
AddProfString(EXAMPLE_INI, szSectionName, "APEOS_ADMIN", szUser);
AddProfString(EXAMPLE_INI, szSectionName, "APEOS_PASS", szPassword);
AddProfString(EXAMPLE_INI, szSectionName, "DEBUG_OCR", "0");
AddProfString(EXAMPLE_INI, szSectionName, "LOG_DIR","C:\\ErrorLog");
AddProfString(EXAMPLE_INI, szSectionName, "INSTALL_DIR","C:\\IGAErrorLog");
AddProfString(EXAMPLE_INI, szSectionName, "TYPEOFIGA","IGACORE");
// endif;
elseif nResult=0 then
//MsiSetProperty(ISMSI_HANDLE,"TYPEOFIGA","SECONDARYIGA");
nResult = PrimaryImageGatewayCaptureDialog( );
endif;
if (nResult = 12) goto Dlg_CustomDlg;
// Display login dialog (with connection name)
// UNCOMMENT TO SWAP DIALOGS
// nResult = SQLServerSelectLogin2( szConnection, szServer, szUser, szPassword, bWinLogin, szDB, TRUE, TRUE );
if( nResult = NEXT ) then
//store data in case we need it again
SQLRTPutConnectionInfo2( szConnection, szServer, szDB, szUser, szPassword );
SQLRTPutConnectionAuthentication( szConnection, bWinLogin );
//test connection
nResult = SQLRTTestConnection2( szConnection, szServer, szDB, szUser, szPassword, bWinLogin );
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
Sprintf(sMessage, SdLoadString( IDS_IFX_SQL_ERROR_LOGIN_FAILED ), szConnection, SdLoadString( ISCRIPT_E_UNKNOWN_ERROR_DESC ));
endif;
MessageBox( sMessage, MB_OK );
//Show same login dialog again
nResult = ListCurrentString(listConnections, szConnection);
else //SUCCESS
//Move on to next connection
nCount++;
bNext = TRUE;
nResult = ListGetNextString(listConnections, szConnection);
endif;
else
//BACK
nCount--;
bNext = FALSE;
nResult = ListSetIndex( listConnections, nCount );
ListCurrentString( listConnections, szConnection );
endif;
endwhile;
end;
I am trying to instal MSDE with the following paramaters.
/qn INSTANCENAME=APEOS SAPWD=xerox SQLCOLLATION=SQL_Latin1_General_CP1_CI_AI ADDLOCAL=All SECURITYMODE=SQL DISABLENETWORKPROTOCOLS=0
But I always get "Error 27502. Could not connect to Microsoft SQL Server (local)/APEOS. [DBNETLIB][ConnectionOpen(Connect()]SQL Server does not exist or Access Denied. (17).
But, the strange part of it is When I run it for second time, installation goes through smoothly.
I changed Inscript Exceution of ISSQLSERVERINSTALL and ISSQLSERVERUNINSTALL custom action to Deferred Exceution, but the error doesnot go away.
At the point of eroor, APEOS SQL service wwasnt listed in the windows services.
There might be something wrong with my script . I am posting it for reference.
Looking forward for response 🙂
//First initialize SQL Server runtime
SQLRTInitialize2();
// Suppress ISSQLSRV.DLL to show a connection error message.
MsiSetProperty( ISMSI_HANDLE, "IS_SQLSERVER_CA_SILENT", "1" );
//Get the names of all the necessary connections
listConnections = SQLRTGetConnections();
ListGetFirstString (listConnections, szConnection);
nCount = 0;
//determine if NEXT or BACK will be returned
//if there are no connections to make
if( nBtn != BACK ) then
bNext = TRUE;
else
bNext = FALSE;
//start at end if going BACK
while (ISERR_SUCCESS = ListGetNextString( listConnections, szConnection ) );
nCount++;
endwhile;
endif;
// Login for each connection
while (nResult = ISERR_SUCCESS)
//Get Default values for connection
SQLRTGetConnectionInfo( szConnection, szServer, szDB, szUser, szPassword );
bWinLogin = SQLRTGetConnectionAuthentication( szConnection );
// Display login dialog (without connection name)
// COMMENT OUT TO SWAP DIALOGS
// nResult = SQLServerSelectLogin2( szConnection, szServer, szUser, szPassword, bWinLogin, szDB, FALSE, TRUE );
// if (nResult = BUTTON_BACK) goto Dlg_SdWelcome;
Dlg_SdWelcome:
szTitle = "";
szMsg = "";
nResult = SdWelcome(szTitle, szMsg);
Dlg_CustomDlg:
nResult= TypeOfServer();
if nResult=BACK then
goto Dlg_SdWelcome;
elseif nResult=1 then
nResult = SQLServerSelectLogin2( szConnection, szServer, szUser, szPassword, bWinLogin, szDB, FALSE, TRUE );
if (nResult = BUTTON_BACK) goto Dlg_CustomDlg;
//if( bNext ) then
// write to ini file
szSectionName = "APEOS_CORE";
szKeyName = "APEOS_SERVER";
EXAMPLE_INI = "C:\\windows\\apeos_core.ini";
// Replace szOrigValue with szReplaceValue.
WriteProfString(EXAMPLE_INI, szSectionName, "APEOS_SERVER", "");
WriteProfString(EXAMPLE_INI, szSectionName, "APEOS_ADMIN", "");
WriteProfString(EXAMPLE_INI, szSectionName, "APEOS_PASS", "");
WriteProfString(EXAMPLE_INI, szSectionName, "DEBUG_OCR", "");
WriteProfString(EXAMPLE_INI, szSectionName, "LOG_DIR", "");
WriteProfString(EXAMPLE_INI, szSectionName, "INSTALL_DIR", "");
WriteProfString(EXAMPLE_INI, szSectionName, "TYPEOFIGA", "");
AddProfString(EXAMPLE_INI, szSectionName, "APEOS_SERVER", szServer);
AddProfString(EXAMPLE_INI, szSectionName, "APEOS_ADMIN", szUser);
AddProfString(EXAMPLE_INI, szSectionName, "APEOS_PASS", szPassword);
AddProfString(EXAMPLE_INI, szSectionName, "DEBUG_OCR", "0");
AddProfString(EXAMPLE_INI, szSectionName, "LOG_DIR","C:\\ErrorLog");
AddProfString(EXAMPLE_INI, szSectionName, "INSTALL_DIR","C:\\IGAErrorLog");
AddProfString(EXAMPLE_INI, szSectionName, "TYPEOFIGA","IGACORE");
// endif;
elseif nResult=0 then
//MsiSetProperty(ISMSI_HANDLE,"TYPEOFIGA","SECONDARYIGA");
nResult = PrimaryImageGatewayCaptureDialog( );
endif;
if (nResult = 12) goto Dlg_CustomDlg;
// Display login dialog (with connection name)
// UNCOMMENT TO SWAP DIALOGS
// nResult = SQLServerSelectLogin2( szConnection, szServer, szUser, szPassword, bWinLogin, szDB, TRUE, TRUE );
if( nResult = NEXT ) then
//store data in case we need it again
SQLRTPutConnectionInfo2( szConnection, szServer, szDB, szUser, szPassword );
SQLRTPutConnectionAuthentication( szConnection, bWinLogin );
//test connection
nResult = SQLRTTestConnection2( szConnection, szServer, szDB, szUser, szPassword, bWinLogin );
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
Sprintf(sMessage, SdLoadString( IDS_IFX_SQL_ERROR_LOGIN_FAILED ), szConnection, SdLoadString( ISCRIPT_E_UNKNOWN_ERROR_DESC ));
endif;
MessageBox( sMessage, MB_OK );
//Show same login dialog again
nResult = ListCurrentString(listConnections, szConnection);
else //SUCCESS
//Move on to next connection
nCount++;
bNext = TRUE;
nResult = ListGetNextString(listConnections, szConnection);
endif;
else
//BACK
nCount--;
bNext = FALSE;
nResult = ListSetIndex( listConnections, nCount );
ListCurrentString( listConnections, szConnection );
endif;
endwhile;
end;
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Mar 09, 2009
12:24 PM
Make sure that the MSDE is installed and has started before the SQLRTInitialize2() function is called.
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)