Problem when loading SQL from a large file to TMSScript.SQL

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
brace
Posts: 213
Joined: Wed 14 Feb 2007 08:26

Problem when loading SQL from a large file to TMSScript.SQL

Post by brace » Wed 27 Oct 2010 15:57

I need to run a single very big sql statement in a TMSScript.

THere are lot of small update statements, wihtout GO, they will aslo go in a single transaction. The script is generated with Delphi and then I would like to put it in the SQL property of the MS Comopnent.

Anyway taking the example of a txt file, I tried 2 approaches:

1) select all the content of the text file in NotePad and paste in MSQuery Editor, then MSScript1.Execute works

2) I do MSScript1.SQL.LoadFromFile('C:\Test\query.txt') in this case MSScript1.Execute is not working. If I monitor with sqlmonitor I see that the sql statement is truncated.

Is this a bug?

Please note that I don't want to run many small scripts because the connection to the server is low, this is why I want to run all them in one single shot (to avoid server latency).

I am using SDAC 4.80 build 59.

AndreyZ

Post by AndreyZ » Fri 29 Oct 2010 08:58

Hello,

I cannot reproduce the problem. Please send your script (packed 'query.txt') to andreyz*devart*com.

Post Reply