SQL Server Native Client 10.0
The new SQL Server Native Client 10.0 app appears not to return the password back when using Delphi’s ADO PromptDataSource
Update: 6/20/2008
There is definitely a bug in the Dialog not in the PrompDataSource. The solution is posted at the end of the article.
Microsoft SQL Server 2008 installs a new OLE DB Provider called: “SQL Server Native Client 10.0” Here is the Data Link Properties image:
Bringing up the ADO Connection Dialog:
CS := PromptDataSource( Handle, "");
One change I can see is that using Delphi’s PrompDataSource function, it returns a different string than previous providers. The Password field seems to be missing:
'Provider=SQLNCLI10.1;Integrated Security="";Persist Security Info=False;User ID=sa;Initial Catalog=XIMS;Data Source=(local);Initial File Name="";Server SPN=""'
Here is the output from PrompDataSource using Microsoft OLE DB Provider for SQL Server:
'Provider=SQLOLEDB.1;Password=1234;Persist Security Info=True;User ID=sa;Initial Catalog=Rome;Data Source=(local)’
Here is an image of the old Data Link Properties editor:
The new Dialog has three key differences :
- You can used mix mode authentication (nothing new here) but also use Windows NT Integrated Security and specify a Server SPN(service principal name). This is quite flexible. For more info click here
- Be able to attache a database file as a database Name - I am guessing this is here due to all the enhancements SQL Server 2008 offers in regards to backing up, restore, compression and encryption database files.
- Be able to Change the database password directly from this page.
If you find out how to retrieve the “whole” string let me know.
Solution: go into the ALL tab and make sure you set Persist Security Info to TRUE the default (today) is FALSE (thanks Ken!)
You might be interested in finding out what’s new in SQL Server 2008