Jump to content
Stéphane Wierzbicki

Delphi Tokyo - Is FDConnection manager broken ? - Need advice connecting MsSQL DB

Recommended Posts

Hello,

 

I'm trying to setting up an FDConnection. What I want to achieve is pretty trivial, basically connect on a MsSQL Database 2012 server. 

Here is what I did :

- Place a FDConnection on my datamodule form

- Doubled clic on it to display the FD connection editor

- Choose 'MSSQL' as my driver ID

- Clicked on the "Expert" (or "Wizard") button

- Filled the server property ( DB01 )

- Clicked on the "Options" button

- Filled the DB user name ( sa )

- Filled the password ( KT}1EBN}sX8! )

- Selected the Database ( selected Certification from the list )

- Click Ok button

- Back to the editor, all values are correctly filled except field Password that contains this : KT}1EBN}sX8!;APP=Enterprise/Architect/Ultimate;WSID=FOCH-VM-DEV01;DATABASE=Certification

      

I'm getting an error (well I guess it is expected) when pressing the "Test" button : invalid connection string attribute

Worse, I'm getting the same error when setting all FDConnection properties and then try to set "Connected" to true.

 

Any idea how to solves this ?

 

Regards

 

 

Edited by swierzbicki

Share this post


Link to post

Can you try the same using a different or no password? Besides an error regarding the wrong password, does it succeed then?

Share this post


Link to post

I am remembering / expecting that "{}" are not supported by SQL Server ODBC driver. Really by ODBC itself (the same with other ODBC drivers). Consider that as limitation of FireDAC SQL Server driver, which uses SQL Server ODBC driver internally.

Share this post


Link to post

If your sql server is not on the same machine as your client, it might be that you don't have the right sql driver verison. Look into the ODBC Data Source Administrator for what version of sql driver you have. E.g for a SQL server 2008 you need at least a version 10.00. I'm not sure wich version you need for server 2012, but it is probably at bit higher than that. You can download the correct version from Microsoft.

Share this post


Link to post
10 hours ago, Dmitry Arefiev said:

I am remembering / expecting that "{}" are not supported by SQL Server ODBC driver. Really by ODBC itself (the same with other ODBC drivers). Consider that as limitation of FireDAC SQL Server driver, which uses SQL Server ODBC driver internally.

So this makes sense.  According to the ODBC 3.0 Spec, the following characters should be avoided for connection string keywords and their attributes: []{}(),;?*=!@

There is one thing that I don't understand as the "Expert" accepts my credentials and list all available databases. Does it means you are not using an ODBC conenction to connect to the server?


image.png.5c483d1beac596ab26aec6828b7ae406.png

 

Now have a look at the "Password" property once I've validated the expert

 

image.thumb.png.d665c08c450156e28e72bc41fb3cc472.png

 

 

 

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×