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
- :
- Re: installscript and SQL COM object
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
‎Jun 16, 2009
11:44 AM
installscript and SQL COM object
Hello people....
i'm trying to work with installscript and SQL connections (and after search in this forum, found the following code; I believe that will resolve my problem), but can't explain the following behavior ...
these installscript code works fine in the machine w2003 server standart with IS2008 but not works in a clean windows XP, i can see the messagebox 1 but not the messagebox 3, an error appears in log file
Why can not I initialize the object? what dependency am I ignoring?
regrats,
i'm trying to work with installscript and SQL connections (and after search in this forum, found the following code; I believe that will resolve my problem), but can't explain the following behavior ...
function debug2(hMSI)
OBJECT oSQLServer;
STRING szSQLServer;
begin
set oSQLServer = CreateObject(SQLDMO.SQLServer);
if (oSQLServer == NOTHING) then
MessageBox ( "1", INFORMATION );
oSQLServer.LoginTimeout = 15;
else
MessageBox ( "2", INFORMATION );
endif;
MessageBox response( "3", INFORMATION );
set oSQLServer = NOTHING;
end;
these installscript code works fine in the machine w2003 server standart with IS2008 but not works in a clean windows XP, i can see the messagebox 1 but not the messagebox 3, an error appears in log file
debug2. Return value 3.
Info 2896.Executing action debug2 failed.
Why can not I initialize the object? what dependency am I ignoring?
regrats,
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 16, 2009
12:58 PM
There could be an issue if the progid passed to CreateObject is not registered on a target machine. This would return no object.
In addition, if no object is created, the line of code immediately following the message box "1" will cause an exception, causing the installation to abort (there is no try/catch in the posted code to catch the exception).
Also note that you may want to use the IsObject function to determine if the object returned by CreateObject is valid instead of comparing to NOTHING.
In addition, if no object is created, the line of code immediately following the message box "1" will cause an exception, causing the installation to abort (there is no try/catch in the posted code to catch the exception).
Also note that you may want to use the IsObject function to determine if the object returned by CreateObject is valid instead of comparing to NOTHING.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 17, 2009
02:33 AM
joshstechnij wrote:
There could be an issue if the progid passed to CreateObject is not registered on a target machine. This would return no object.
Yes , I agree; I installed IS2008 evaluation in this machine (for debug) and the COM object began to works fine. so, I think, I need to register one or more DLL before.... which? I haven't got idea.