Watch, Follow, &
Connect with Us

Please visit our new home
community.embarcadero.com.


Welcome, Guest
Guest Settings
Help

Thread: ExecSQL error [FireDAC][Phys][MSSQL]-310



Permlink Replies: 2 - Last Post: Apr 17, 2018 2:52 AM Last Post By: Dmitry Vavilov Threads: [ Previous | Next ]
Dmitry Vavilov

Posts: 29
Registered: 9/23/17
ExecSQL error [FireDAC][Phys][MSSQL]-310
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 17, 2018 1:13 AM
Hello!
I need all SQL scripts located in a folder as separate files. These SQL scripts update the structure and data in the database. I need to execute all these SQL scripts. Earlier, working through ADO, I downloaded scripts in ADOQuery and called the ExecSQL method. When I switched to FireDAC, when I run some scripts I get an error "[FireDAC] [Phys] [MSSQL] -310." Hint: use Open method for SELECT-like commands. ". How to work out scripts so that there are no errors (as it happens in ADO)? Is there a universal method for executing scripts?
Lajos Juhasz

Posts: 801
Registered: 3/14/14
Re: ExecSQL error [FireDAC][Phys][MSSQL]-310
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 17, 2018 1:49 AM   in response to: Dmitry Vavilov in response to: Dmitry Vavilov
Dmitry Vavilov wrote:

Hello!
I need all SQL scripts located in a folder as separate files. These
SQL scripts update the structure and data in the database. I need to
execute all these SQL scripts. Earlier, working through ADO, I
downloaded scripts in ADOQuery and called the ExecSQL method. When I
switched to FireDAC, when I run some scripts I get an error
"[FireDAC] [Phys] [MSSQL] -310." Hint: use Open method for
SELECT-like commands. ". How to work out scripts so that there are no
errors (as it happens in ADO)? Is there a universal method for
executing scripts?

You can use the OpenOrExecute method (those scripts that update the
structure should not contain select statements).

http://docwiki.embarcadero.com/Libraries/Tokyo/en/FireDAC.Comp.DataSet.TFDDataSet.OpenOrExecute
Dmitry Vavilov

Posts: 29
Registered: 9/23/17
Re: ExecSQL error [FireDAC][Phys][MSSQL]-310
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 17, 2018 2:52 AM   in response to: Lajos Juhasz in response to: Lajos Juhasz
Thank you very much
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02