We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

MLiss@Cetrus.com
Posts: 366
Joined: Wed Dec 30, 2015 5:40 pm

SQLExecDirect error message

Hi,

I have just added a script to my installer and I am getting an error message that I believe is purely informational
(according to this site: https://msdn.microsoft.com/en-us/librar ... s.85).aspx )

Here is a snapshot:
SQLExecDirect.PNG
SQLExecDirect.PNG (246.94 KiB) Viewed 3789 times
I have also attached my install project for your inspection
( I have removed most of the DLLs and the prerequisites from the installer... but hopefully that won't be an issue as the program doesn't need to run to experience this problem... it's during the install when the problem manifests)

Thanks
Mike
Attachments
Manager.zip
(308.59 KiB) Downloaded 316 times
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: SQLExecDirect error message

Hi Mike,

This is an SQL Driver predefined message that appears when the working database is changed. In your case, you connect to the "master" database through your predefined connection and then connect to another database through the following line from your SQL Query script:

Code: Select all

Use [PMInfrastructure]
In order to avoid this message, you can connect directly to the "PMInfrastructure" through the predefined connection and remove the following lines from your SQL Query script:

Code: Select all

IF NOT EXISTS (SELECT name FROM master.sys.databases WHERE name = N'PMInfrastructure')
BEGIN
	create database PMInfrastructure  
END

Use [PMInfrastructure]
Otherwise, you can try the method suggested in the "How to stop the “Changed database context to …” message" thread.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
MLiss@Cetrus.com
Posts: 366
Joined: Wed Dec 30, 2015 5:40 pm

Re: SQLExecDirect error message

thanks... giving this a try
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: SQLExecDirect error message

You're welcome Mike.

Just let me know if you have any question.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”