Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 10 of 13 total |
error in TEDBScript.ExecScript update |
Mon, Jul 23 2012 8:11 PM | Permanent Link |
Bryn Lewis Intelligent Software and Systems | Hi,
I am executing an update on a CLOB field. When doing TEDBScript.ExecScript, I am getting a stack overflow if the update value is >~15000 characters (not usre exactly what the limit is). It doesn't seem to matter what the characters are. The same statement executes ok inside EDBManager. The procedure handling the TEDBScript.ExecScript does many other SQL statements without any problems, so I suspect it is the size of the data that is the issue. Are there parameters in the connection somewhere that need to be adjusted to handle certain sizes? thanks, Bryn |
Tue, Jul 24 2012 4:11 PM | Permanent Link |
Fernando Dias Team Elevate | Bryn,
Would you please post the exact error message and the statement please? Also, what version are you using? -- Fernando Dias [Team Elevate] Em 24-07-2012 01:11, Bryn Lewis escreveu: > Hi, > > I am executing an update on a CLOB field. > > When doing TEDBScript.ExecScript, I am getting a stack overflow if the update value is >~15000 characters (not usre exactly what the limit is). It doesn't seem to matter what the characters are. > > The same statement executes ok inside EDBManager. > > The procedure handling the TEDBScript.ExecScript does many other SQL statements without any problems, so I suspect it is the size of the data that is the issue. > > Are there parameters in the connection somewhere that need to be adjusted to handle certain sizes? > > thanks, Bryn > |
Tue, Jul 24 2012 7:39 PM | Permanent Link |
Bryn Lewis Intelligent Software and Systems | The exception is:
Project raised exception class EStackOverflow with message 'Stack overflow'. Process stopped. Use Step or Run to continue. Then it gets nasty with: Project faulted with message: 'access violation at 0x007223dc: write of address 0x01b00ffc'. Process Stopped. Use Step or Run to continue. |
Wed, Jul 25 2012 5:59 AM | Permanent Link |
Fernando Dias Team Elevate | Bryan,
What about the script? Can you post it? -- Fernando Dias [Team Elevate] |
Thu, Jul 26 2012 12:22 AM | Permanent Link |
Bryn Lewis Intelligent Software and Systems | SCRIPT ()
BEGIN EXECUTE IMMEDIATE 'update project1 set itemgp=''A large amount of text ... goes here '' where id=100315'; END The problem seems to be scripts doing an insert into a CLOB with a large amount of text. The same script runs fine in EDBManager. |
Thu, Jul 26 2012 3:23 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Bryn
I suspect that rather than the pure size of the data its the content. Can you save the ACTUAL script and post that. Roy Lambert [Team Elevate] |
Thu, Jul 26 2012 4:22 AM | Permanent Link |
Bryn Lewis Intelligent Software and Systems | Its not the content. If I do:
SCRIPT () BEGIN EXECUTE IMMEDIATE 'update project1 set itemgp=''aaaaaaa '' where id=100315'; END -with a string of 15,0000 a's, it raises a SO in the TExecScript, but will work in EDBManager -It doesn't matter what field or table (always a CLOB field). -v.2.04 and D7, btw |
Thu, Jul 26 2012 6:18 AM | Permanent Link |
Fernando Dias Team Elevate | Bryn,
I don't have D7 anymore to test it... It might have to do with the way D7 treats string literals and passes them on stack, but I'm guessing here. What happens if you increase the stack size in D7 (Project/Options/Linker I think...) ? -- Fernando Dias [Team Elevate] |
Thu, Jul 26 2012 12:18 PM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Bryn
>Its not the content. If I do: > >SCRIPT () >BEGIN > EXECUTE IMMEDIATE 'update project1 set itemgp=''aaaaaaa '' where id=100315'; >END > >-with a string of 15,0000 a's, it raises a SO in the TExecScript, but will work in EDBManager > >-It doesn't matter what field or table (always a CLOB field). > >-v.2.04 and D7, btw Off the top of my head there aren't any options in the engine, session or database that relate to the size of a CLOB and its handling. If the version of ElevateDB you're using in your code and the version in EDBManager are the same and it works in EDBManager then the problem has to be somewhere in your code (remember EDBManager is just another ElevateDB app . If they are different and EDBManager is using a later one there could have been a bug in the version you're coding with and you need to upgrade. I don't have D7 and I'm using ElevateDB v2.08 but I'll have an experiment in D6 & D2006 over the weekend Roy Lambert [Team Elevate] |
Sun, Jul 29 2012 9:29 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Bryn
I've tried procedure TForm1.Button1Click(Sender: TObject); var str: string; cntr: integer; begin str := ''; for cntr := 0 to 15000 do str := str + 'X-'; EDBScript1.SQL.Text := 'SCRIPT ()' + #13 + 'BEGIN' + #13 + 'EXECUTE IMMEDIATE' + QuotedStr('update Test set _Clob = ''' + str + ''' where _RowNo=44') + ';'#13 + 'END'; EDBScript1.ExecScript; end; in D6 / EDB 2.08 Build 3 and it works fine Roy Lambert [Team Elevate] |
Page 1 of 2 | Next Page » | |
Jump to Page: 1 2 |
This web page was last updated on Sunday, May 5, 2024 at 10:18 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |