# Control for database script

**URL:** <https://forum.xojo.com/t/control-for-database-script/51088>\
**Category:** Windows\
**Created:** [November 8, 2019, 7:21am UTC](https://forum.xojo.com/t/control-for-database-script/51088 "2019-11-08T07:21:30Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![chetana\_nikam](https://forum.xojo.com/letter_avatar_proxy/v4/letter/c/cdc98d/32.png) [@chetana\_nikam](https://forum.xojo.com/u/chetana_nikam)\
**Post date:** [November 8, 2019, 7:21am UTC](https://forum.xojo.com/t/control-for-database-script/51088/1 "2019-11-08T07:21:30Z")

</div>

Is there any control available to add mysql queries(script) in it?

What i want to do is place queries somewhere and then read it line by line and execute on database.

i tried it by using TextArea control but seems there is characters limit for textarea as i am not able to add my all the queries in it.

---

<div class="post-metadata">

**Author:** ![Emile\_Schwarz](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/90ced4/32.png) [@Emile\_Schwarz](https://forum.xojo.com/u/Emile_Schwarz)\
**Post date:** [November 8, 2019, 10:08am UTC](https://forum.xojo.com/t/control-for-database-script/51088/2 "2019-11-08T10:08:16Z")

</div>

> [@462362:@chetana nikam](#):
>
> characters limit for textarea

Whats your installed RAM value ?

What is your script size ?

---

<div class="post-metadata">

**Author:** ![chetana\_nikam](https://forum.xojo.com/letter_avatar_proxy/v4/letter/c/cdc98d/32.png) [@chetana\_nikam](https://forum.xojo.com/u/chetana_nikam)\
**Post date:** [November 8, 2019, 11:41am UTC](https://forum.xojo.com/t/control-for-database-script/51088/3 "2019-11-08T11:41:00Z")

</div>

[quote=462378:@Emile Schwarz]Whats your installed RAM value ?

What is your script size ?[/quote]

i have 8 GB RAM and Windows 10 OS.

i don’t know the total no. of characters but there are about 50,000 lines of script, out of them about 10,000 get copied into TextArea’s value editor

Maximum Characters allowed is set to 0.

When i backspace few characters then i can enter that much characters.

---

<div class="post-metadata">

**Author:** ![Louis\_D](https://forum.xojo.com/letter_avatar_proxy/v4/letter/l/cab0a1/32.png) [@Louis\_D](https://forum.xojo.com/u/Louis_D)\
**Post date:** [November 8, 2019, 3:03pm UTC](https://forum.xojo.com/t/control-for-database-script/51088/4 "2019-11-08T15:03:40Z")

</div>

I would place the script lines in an array of strings. Then, I would use a listbox to display a moving window of the array elements. For example, you start showing script lines at index 0 to index 24. With a pageDown, you fetch elements 25 to 49, and so on. You can then develop logic to edit specific elements, move up and down by larger or smaller increments, even run individual elements or groups of elements. The key is that the data is kept in the array, and the UI only serves to show and manipulate the data.

Arrays can have a maximum index value of 2,147,483,646 therefore with this concept, you are probably constrained by the system resources only.

---

<div class="post-metadata">

**Author:** ![Jean-Yves\_Pochez](https://forum.xojo.com/user_avatar/forum.xojo.com/jean-yves_pochez/32/21769_2.png) [@Jean-Yves\_Pochez](https://forum.xojo.com/u/Jean-Yves_Pochez)\
**Post date:** [November 8, 2019, 3:22pm UTC](https://forum.xojo.com/t/control-for-database-script/51088/5 "2019-11-08T15:22:29Z")

</div>

did you try with this custom-edit-field control :  
[https://github.com/tempelmann/custom-editfield](https://github.com/tempelmann/custom-editfield)

---

<div class="post-metadata">

**Author:** ![system](https://forum.xojo.com/uploads/default/original/1X/455b4dcc0e61630e9f81940004ddffa49c432a46.png) [@system](https://forum.xojo.com/u/system)\
**Post date:** [April 29, 2021, 4:09pm UTC](https://forum.xojo.com/t/control-for-database-script/51088/6 "2021-04-29T16:09:57Z")

</div>


