Hello and welcome to our forums,
If I use checkbox "Create database if it does not exist" in Predefined connection tab, database is created in default sql server directory (C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\DATA)
Please note that this is the default behavior. The database will be created under the Server you selected in the
"SQLServerConnectionDlg" dialog.
If I keep this checkbox unchecked and create custom sql script for creating db with specifying desired path for mdf and ldf files, I get an error "Cannot open database TestDB requested by the login. The login failed."
If possible, could you please create a sample project which contains your SQL Script and forward it to me so I can run some tests on my end?
Best regards,
Catalin
FOLLOW US
Get the latest news in Application Packaging