1 'encoding UTF-8 Do not remove or change this line!
2 '**************************************************************************
3 '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 '* Copyright 2008 by Sun Microsystems, Inc.
7 '* OpenOffice.org - a multi-platform office productivity suite
9 '* $RCSfile: db_Query.inc,v $
13 '* last change: $Author: jsi $ $Date: 2008-06-16 07:43:41 $
15 '* This file is part of OpenOffice.org.
17 '* OpenOffice.org is free software: you can redistribute it and/or modify
18 '* it under the terms of the GNU Lesser General Public License version 3
19 '* only, as published by the Free Software Foundation.
21 '* OpenOffice.org is distributed in the hope that it will be useful,
22 '* but WITHOUT ANY WARRANTY; without even the implied warranty of
23 '* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 '* GNU Lesser General Public License version 3 for more details
25 '* (a copy is included in the LICENSE file that accompanied this code).
27 '* You should have received a copy of the GNU Lesser General Public License
28 '* version 3 along with OpenOffice.org. If not, see
29 '* <http://www.openoffice.org/license.html>
30 '* for a copy of the LGPLv3 License.
32 '/************************************************************************
34 '* owner : marc.neumann@sun.com
36 '* short description : Query Test Library
38 '\***********************************************************************
39 'TODO: testcase for distinct values
40 function db_Query( sFileName , optional sType , optional sPassword)
42 if isMissing (sType) then
60 call tQueryCriterion( sFileName , sType , sPassword)
62 if sType <> "1" then 'run only with database from type >1
63 call tQueryJoin( sFileName , sType, sPassword )
64 call tQueriesInQueries(sFileName)
67 call tSortQueryWithAlias(sFileName , sPassword)
70 '-------------------------------------------------------------------------
71 function tQueryJoin( sFileName , optional sType, optional sPassword )
72 'TODO: check Join Type ( LEFT , INNER etc bug i17390)
73 Dim SelEntry as string
74 Dim sTableName as string
76 sTableName = "TT_Query2"
78 if IsMissing(sPassword) then
79 if ( not fOpenDatabase(sFileName) ) then
80 warnlog "Database can't be open"
84 if ( not fOpenDatabase(sFileName,sPassword) ) then
85 warnlog "Database can't be open"
93 'TODO: add a test to click on the execute button, before the add table dialog is closed.
96 ix = TableName.getItemCount
99 TableName.TypeKeys "<ADD>"
100 'printlog "ix = " + ix
101 'printlog "TableName.getItemCount = " + TableName.getItemCount
102 if TableName.getItemCount > ix then
103 ix = TableName.getItemCount
104 'printlog "TableName.getItemCount > ix"
106 'printlog "TableName.getSeltext = " + TableName.getSeltext
107 if TableName.getSeltext = sTableName then
111 if TableName.getSeltext <> sTableName then
112 warnlog "Can find the table " + sTableName + "." + _
113 "Make sure that the table exists when starting this test."
117 if Messagebox.Exists(3) then
118 if Messagebox.getRT = 304 then
125 printlog "- Add " + sTableName +" table to query design"
126 '/// Add database table to Query.
128 '######## add table TT_Query2 #########
129 sTableName = "TT_Query3"
131 'TODO: add a test to click on the execute button, before the add table dialog is closed.
132 ix = TableName.getItemCount
135 TableName.TypeKeys "<ADD>"
136 if TableName.getItemCount > ix then
137 ix = TableName.getItemCount
140 if TableName.getSeltext = sTableName then
145 if TableName.getSeltext <> sTableName then
146 warnlog "Can find the table " + sTableName + "." + _
147 "Make sure that the table exists when starting this test."
151 printlog "- Add " + sTableName +" table to query design"
152 '/// Add database table to Query.
156 if AddTables.exists(2) then
157 CloseDlg.Click ' When the AddTables dialog still exists then close him
161 Kontext "QueryDesignTable"
162 QueryDesignTable.useMenu
169 Kontext "JoinProperties"
170 JoinProperties.TypeKeys "<TAB>" , true
172 JoinProperties.TypeKeys "<TAB>" , true
174 JoinProperties.TypeKeys "<TAB>" , true
176 JoinProperties.TypeKeys "<TAB>" , true
178 JoinProperties.TypeKeys "<MOD1 DOWN>" , true
180 JoinProperties.TypeKeys "<TAB>" , true
182 JoinProperties.TypeKeys "<MOD1 DOWN>" , true
186 Kontext "QueryDesignCriterion"
188 QueryDesignCriterion.TypeKeys "<MOD1 PAGEUP>" , true
190 QueryDesignCriterion.TypeKeys "<HOME>" , true
192 QueryDesignCriterion.TypeKeys "<DOWN>" , 2 , true
194 QueryDesignCriterion.TypeKeys "<MOD1 DOWN>" , true
196 QueryDesignCriterion.TypeKeys "<UP>" , 2 , true
198 QueryDesignCriterion.TypeKeys "<MOD1 UP>" , 3 , true
200 QueryDesignCriterion.TypeKeys "<DOWN>" , 5 , true
202 QueryDesignCriterion.TypeKeys "<MOD1 DOWN>" , 2 , true
209 if TableView.Exists(3) then
211 DataWindow.TypeKeys "<MOD1 C>"
212 if GetClipboard <> "4" then
213 warnlog "Wrong result, maybe the join doesn't work."
217 call fCloseQueryDesign
222 '-------------------------------------------------------------------------
223 function tQueryCriterion( sFileName , optional sType , optional sPassword)
225 Dim SelEntry as string
226 Dim sTableName as string
228 sTableName = "TT_Query1"
230 if IsMissing(sPassword) then
231 if ( not fOpenDatabase(sFileName) ) then
232 warnlog "Database can't be open"
236 if ( not fOpenDatabase(sFileName,sPassword) ) then
237 warnlog "Database can't be open"
246 'TODO: add a test to click on the execute button, before the add table dialog is closed.
249 ix = TableName.getItemCount
252 TableName.TypeKeys "<ADD>"
253 'printlog "ix = " + ix
254 'printlog "TableName.getItemCount = " + TableName.getItemCount
255 if TableName.getItemCount > ix then
256 ix = TableName.getItemCount
257 'printlog "TableName.getItemCount > ix"
259 'printlog "TableName.getSeltext = " + TableName.getSeltext
260 if TableName.getSeltext = sTableName then
264 if TableName.getSeltext <> sTableName then
265 warnlog "Can find the table " + sTableName + "." + _
266 "Make sure that the table exists when starting this test."
270 if Messagebox.Exists(3) then
271 if Messagebox.getRT = 304 then
278 printlog "- Add " + sTableName +" table to query design"
279 '/// Add database table to Query.
282 if AddTables.exists(2) then
283 CloseDlg.Click ' When the AddTables dialog still exists then close him
286 Kontext "QueryDesignCriterion"
291 printlog "- Executing query"
295 if NOT DataWindow.Exists(3) then
296 warnlog "Execution of a query failed!"
298 ' #### don't comment a test, because they depends on each other ####
300 '/// start the 1. test #############################
301 printlog "start the 1. test #############################"
303 '/// start the 2. test
304 printlog "start the 2. test"
306 '/// start the 3. test
307 printlog "start the 3. test"
309 '/// start the 4. test
310 printlog "start the 4. test"
312 '/// start the 5. test
313 printlog "start the 5. test"
315 '/// start the 6. test
316 printlog "start the 6. test"
318 '/// start the 7. test
319 printlog "start the 7. test"
321 '/// start the 8. test
322 printlog "start the 8. test"
324 ' main test end ###############################
325 printlog "main test end ###############################"
331 '-------------------------------------------------------------------------
332 function tQueriesInQueries( sFileName , optional sType , optional sPassword)
334 Dim SelEntry as string
335 Dim sTableName as string
337 sTableName = "TT_Query1"
339 if IsMissing(sPassword) then
340 if ( not fOpenDatabase(sFileName) ) then
341 warnlog "Database can't be open"
345 if ( not fOpenDatabase(sFileName,sPassword) ) then
346 warnlog "Database can't be open"
351 '/// open new query design
352 printlog "open new query design"
353 call fOpenNewQueryDesign
355 '/// choose table TT_Query1 from AddTable dialog
356 printlog "choose table TT_Query1 from AddTable dialog"
357 call fChooseTableInQueryAddTableDialog("TT_Query1")
359 '/// insert fields name1 and name2
360 printlog "insert fields name1 and name2"
361 Kontext "QueryDesignCriterion"
363 printlog "Go to the top left field."
364 QueryDesignCriterion.TypeKeys "<MOD1 PAGEUP>" , true
366 QueryDesignCriterion.TypeKeys "<HOME>" , true
368 QueryDesignCriterion.TypeKeys "<MOD1 UP>" , 7, true
370 QueryDesignCriterion.TypeKeys "<RETURN>" , true
372 QueryDesignCriterion.TypeKeys "<MOD1 UP>" , 6, true
374 QueryDesignCriterion.TypeKeys "<RETURN>" , true
378 '/// save the query as Query_test_1
379 printlog "save the query as Query_test_1"
380 call fSaveQueryDesign("Query_test_1")
382 '/// close the query design
383 printlog "close the query design"
384 call fCloseQueryDesign()
386 '/// open new query design
387 printlog "open new query design"
388 call fOpenNewQueryDesign
390 '/// choose query Query_test_1 from AddTable dialog
391 printlog "choose query Query_test_1 from AddTable dialog"
392 call fChooseQueryInQueryAddTableDialog("Query_test_1")
394 '/// insert fields name1
395 printlog "insert fields name1"
396 Kontext "QueryDesignCriterion"
398 printlog "Go to the top left field."
399 QueryDesignCriterion.TypeKeys "<MOD1 PAGEUP>" , true
401 QueryDesignCriterion.TypeKeys "<HOME>" , true
403 QueryDesignCriterion.TypeKeys "<MOD1 UP>" , 2, true
405 QueryDesignCriterion.TypeKeys "<RETURN>" , true
409 '/// save the query with the name Query_test_2
410 printlog "save the query with the name Query_test_2"
411 call fSaveQueryDesign("Query_test_2")
413 '/// close the query design
414 printlog "close the query design"
415 call fCloseQueryDesign()
417 '/// close the query design
418 printlog "close the query design"
419 call fCloseDatabase(true)
421 '/// open the database again
422 printlog "open the database again"
423 if IsMissing(sPassword) then
424 if ( not fOpenDatabase(sFileName) ) then
425 warnlog "Database can't be open"
429 if ( not fOpenDatabase(sFileName,sPassword) ) then
430 warnlog "Database can't be open"
435 '/// execute the QueryInQuery "Query_test_2"
436 printlog "execute the QueryInQuery Query_test_2"
437 if ( fOpenQuery("Query_test_2") = false ) then
438 warnlog "Can't open query Query_test_2"
439 call fCloseDatabase()
443 '/// close Query view
444 printlog "close Query view"
445 call fCloseQueryView()
448 printlog "close database"
449 call fCloseDatabase()
452 '-------------------------------------------------------------------------
458 '/// insert the <b>* as field</b>
459 '/// take <b>count</b> from the <b>function</b> listbox
460 '/// <b>Execute</b> the query
461 '/// the <b>result</b> should be <b>11</b>
462 Kontext "QueryDesignCriterion"
464 printlog "Go to the top left field."
465 QueryDesignCriterion.TypeKeys "<MOD1 PAGEUP>" , true
467 QueryDesignCriterion.TypeKeys "<HOME>" , true
469 QueryDesignCriterion.TypeKeys "<DOWN>" , 5 , true
471 QueryDesignCriterion.TypeKeys "<MOD1 DOWN>" , true
475 printlog "- Executing query"
479 if TableView.Exists(3) then
480 DataWindow.TypeKeys "<MOD1 C>"
481 if GetClipboard <> "11" then
482 warnlog "There should be 11 records but there are " + GetClipboard
484 printlog GetClipboard + " records available."
487 warnlog "Execution of a query failed!"
493 '/// add the field <b>'name1'</b> to the field list
494 '/// set the field <b>invisible</b>
495 '/// as criterion insert <b>LIKE 'F*'</b>
496 '/// <b>execute</b> the query
497 '/// the <b>result</b> should be <b>3</b>
498 Kontext "QueryDesignCriterion"
500 printlog "Go to the top left field."
501 QueryDesignCriterion.TypeKeys "<MOD1 PAGEUP>" , true
503 QueryDesignCriterion.TypeKeys "<HOME>" , true
505 QueryDesignCriterion.TypeKeys "<TAB>" , true
507 QueryDesignCriterion.TypeKeys "<SHIFT PAGEUP>" , true
509 QueryDesignCriterion.TypeKeys "<MOD1 DOWN>" , 2 , true
511 QueryDesignCriterion.TypeKeys "<DOWN>" , 4 , true
513 QueryDesignCriterion.TypeKeys "<SPACE>" , true
515 QueryDesignCriterion.TypeKeys "<DOWN>" , 2 , true
517 QueryDesignCriterion.TypeKeys "LIKE 'F*'" , true
519 QueryDesignCriterion.TypeKeys "<RETURN>" , true
523 printlog "- Executing query"
527 if TableView.Exists(3) then
529 DataWindow.TypeKeys "<MOD1 C>"
530 if GetClipboard <> "3" then
531 warnlog "There should be 3 records but there are " + GetClipboard
533 printlog GetClipboard + " records available."
536 warnlog "Execution of a query failed!"
542 '/// add the field <b>'date'</b> to the field list
543 '/// set the field <b>invisible</b>
544 '/// as criterion insert <b>IS NULL</b>
545 '/// b>execute</b> the query
546 '/// the <b>result</b> should be <b>1</b>
547 Kontext "QueryDesignCriterion"
549 printlog "Go to the top left field."
550 QueryDesignCriterion.TypeKeys "<MOD1 PAGEUP>" , true
552 QueryDesignCriterion.TypeKeys "<HOME>" , true
554 QueryDesignCriterion.TypeKeys "<TAB>" , 2 , true
556 QueryDesignCriterion.TypeKeys "<SHIFT PAGEUP>" , true
558 QueryDesignCriterion.TypeKeys "<MOD1 DOWN>" , 7 , true
560 QueryDesignCriterion.TypeKeys "<DOWN>" , 4 , true
562 QueryDesignCriterion.TypeKeys "<SPACE>" , true
564 QueryDesignCriterion.TypeKeys "<DOWN>" , 2 , true
566 QueryDesignCriterion.TypeKeys "IS NULL" , true
568 QueryDesignCriterion.TypeKeys "<RETURN>" , true
570 'TODO: check if the right localazied string appear
573 printlog "- Executing query"
577 if TableView.Exists(3) then
579 DataWindow.TypeKeys "<MOD1 C>"
580 if GetClipboard <> "1" then
581 warnlog "There should be 1 records but there are " + GetClipboard
583 printlog GetClipboard + " records available."
586 warnlog "Execution of a query failed!"
592 '/// <b>change</b> the criterion for field <b>date</b> to <b>is not null</b>
593 '/// <b>execute</b> the query
594 '/// the <b>result</b> should be <b>2</b>
595 Kontext "QueryDesignCriterion"
597 printlog "Go to the top left field."
598 QueryDesignCriterion.TypeKeys "<MOD1 PAGEUP>" , true
600 QueryDesignCriterion.TypeKeys "<HOME>" , true
602 QueryDesignCriterion.TypeKeys "<TAB>" , 2 , true
604 QueryDesignCriterion.TypeKeys "<DOWN>" , 6 , true
606 QueryDesignCriterion.TypeKeys "<SHIFT END>" , true
608 QueryDesignCriterion.TypeKeys "IS NOT NULL" , true
610 QueryDesignCriterion.TypeKeys "<RETURN>" , true
612 'TODO: check if the right localazied string appear
615 printlog "- Executing query"
619 if TableView.Exists(3) then
621 DataWindow.TypeKeys "<MOD1 C>"
622 if GetClipboard <> "2" then
623 warnlog "There should be 2 records but there are " + GetClipboard
625 printlog GetClipboard + " records available."
628 warnlog "Execution of a query failed!"
634 '/// <b>remove</b> the fields <b>'name1' and 'date'</b>
635 '/// <b>add</b> field <b>ID</b>
636 '/// set <b>ID invisible</b>
637 '/// as <b>criterion</b> insert <b>BETWEEN 4 AND 7</b>
638 '/// <b>execute</b> the query
639 '/// the <b>result</b> should be <b>4</b>
640 Kontext "QueryDesignCriterion"
642 printlog "Go to the top left field."
643 QueryDesignCriterion.TypeKeys "<MOD1 PAGEUP>" , true
645 QueryDesignCriterion.TypeKeys "<HOME>" , true
647 QueryDesignCriterion.TypeKeys "<TAB>" , true
649 QueryDesignCriterion.TypeKeys "<SHIFT END>" , true
651 QueryDesignCriterion.TypeKeys "<DELETE>" , true
653 QueryDesignCriterion.TypeKeys "<SHIFT PAGEUP>" , true
655 QueryDesignCriterion.TypeKeys "<MOD1 DOWN>" , true
657 QueryDesignCriterion.TypeKeys "<DOWN>" , 6 , true
659 QueryDesignCriterion.TypeKeys "<SHIFT END>" , true
661 QueryDesignCriterion.TypeKeys "<DELETE>" , true
663 QueryDesignCriterion.TypeKeys "BETWEEN 4 AND 7" , true
665 QueryDesignCriterion.TypeKeys "<RETURN>" , true
667 QueryDesignCriterion.TypeKeys "<MOD1 PAGEUP>" , true
669 QueryDesignCriterion.TypeKeys "<SHIFT END>" , true
671 QueryDesignCriterion.TypeKeys "<DELETE>" , true
673 QueryDesignCriterion.TypeKeys "<RETURN>" , true
675 'TODO: check if the right localazied string appear
678 printlog "- Executing query"
682 if TableView.Exists(3) then
684 DataWindow.TypeKeys "<MOD1 C>"
685 if GetClipboard <> "4" then
686 warnlog "There should be 4 records but there are " + GetClipboard
688 printlog GetClipboard + " records available."
691 warnlog "Execution of a query failed!"
697 '/// <b>change the criterion</b> for field ID to <b>NOT BETWEEN 4 AND 7</b>
698 '/// <b>execute</b> the query
699 '/// the <b>result</b> should be <b>7</b>
700 Kontext "QueryDesignCriterion"
702 printlog "Go to the top left field."
703 QueryDesignCriterion.TypeKeys "<MOD1 PAGEUP>" , true
705 QueryDesignCriterion.TypeKeys "<HOME>" , true
707 QueryDesignCriterion.TypeKeys "<TAB>" , true
709 QueryDesignCriterion.TypeKeys "<DOWN>" , 6 , true
711 QueryDesignCriterion.TypeKeys "<SHIFT END>" , true
713 QueryDesignCriterion.TypeKeys "NOT BETWEEN 4 AND 7" , true
715 QueryDesignCriterion.TypeKeys "<RETURN>" , true
717 'TODO: check if the right localazied string appear
720 printlog "- Executing query"
724 if TableView.Exists(3) then
726 DataWindow.TypeKeys "<MOD1 C>"
727 if GetClipboard <> "7" then
728 warnlog "There should be 7 records but there are " + GetClipboard
730 printlog GetClipboard + " records available."
733 warnlog "Execution of a query failed!"
739 '/// remove the field ID
740 '/// <b>add</b> field <b>name1</b>
741 '/// set name1 <b>invisible</b>
742 '/// as <b>criterion</b> insert <b>IN ('Heinz','Freddi')</b>
743 '/// <b>execute</b> the query
744 '/// the <b>result</b> should be <b>2</b>
745 Kontext "QueryDesignCriterion"
747 printlog "Go to the top left field."
748 QueryDesignCriterion.TypeKeys "<MOD1 PAGEUP>" , true
750 QueryDesignCriterion.TypeKeys "<HOME>" , true
752 QueryDesignCriterion.TypeKeys "<TAB>" , true
754 QueryDesignCriterion.TypeKeys "<SHIFT END>" , true
756 QueryDesignCriterion.TypeKeys "<DELETE>" , true
758 QueryDesignCriterion.TypeKeys "<SHIFT PAGEUP>" , true
760 QueryDesignCriterion.TypeKeys "<MOD1 DOWN>" , 2 , true
762 QueryDesignCriterion.TypeKeys "<DOWN>" , 6 , true
764 QueryDesignCriterion.TypeKeys "<SHIFT END>" , true
766 QueryDesignCriterion.TypeKeys "<DELETE>" , true
768 QueryDesignCriterion.TypeKeys "IN ('Heinz','Freddi')" , true
771 'TODO: check if the right localazied string appear
774 printlog "- Executing query"
778 if TableView.Exists(3) then
780 DataWindow.TypeKeys "<MOD1 C>"
781 if GetClipboard <> "2" then
782 warnlog "There should be 2 records but there are " + GetClipboard
784 printlog GetClipboard + " records available."
787 warnlog "Execution of a query failed!"
793 '/// change <b>criterion</b> to <b>NOT IN ('Heinz','Freddi')</b>
794 '/// <b>execute</b> the query
795 '/// the <b>result</b> should be <b>9</b>
796 Kontext "QueryDesignCriterion"
798 printlog "Go to the top left field."
799 QueryDesignCriterion.TypeKeys "<MOD1 PAGEUP>" , true
801 QueryDesignCriterion.TypeKeys "<HOME>" , true
803 QueryDesignCriterion.TypeKeys "<TAB>" , true
805 QueryDesignCriterion.TypeKeys "<DOWN>" , 6 , true
807 QueryDesignCriterion.TypeKeys "<SHIFT END>" , true
809 QueryDesignCriterion.TypeKeys "NOT IN ('Heinz','Freddi')" , true
811 QueryDesignCriterion.TypeKeys "<RETURN>" , true
813 'TODO: check if the right localazied string appear
816 printlog "- Executing query"
820 if TableView.Exists(3) then
822 DataWindow.TypeKeys "<MOD1 C>"
823 if GetClipboard <> "9" then
824 warnlog "There should be 9 records but there are " + GetClipboard
826 printlog GetClipboard + " records available."
829 warnlog "Execution of a query failed!"
833 '--------------------------------------------------------------------
834 function tSortQueryWithAlias(sFileName, optional sPassword) ' test for isse 27832
836 if IsMissing(sPassword) then
837 if ( not fOpenDatabase(sFileName) ) then
838 warnlog "Database can't be open"
842 if ( not fOpenDatabase(sFileName,sPassword) ) then
843 warnlog "Database can't be open"
848 if ( fOpenNewQueryDesign ) then
849 if ( fChooseTableInQueryAddTableDialog("TT_Query1") ) then
850 Kontext "QueryDesignCriterion"
852 QueryDesignCriterion.TypeKeys "<MOD1 PAGEUP>" , true
854 QueryDesignCriterion.TypeKeys "<MOD1 SHIFT DOWN>" , true
856 QueryDesignCriterion.TypeKeys "<MOD1 SHIFT DOWN>" , true
858 QueryDesignCriterion.TypeKeys "<DOWN>" , true
860 QueryDesignCriterion.TypeKeys "test" , true
863 printlog "- Executing query"
867 call fCloseQueryDesign
874 '--------------------------------------------------------------------
875 function fChooseTableInQueryAddTableDialog(sTableName as string) as boolean
879 if ( not AddTables.exists(1) ) then
880 fChooseTableInQueryAddTableDialog = false
884 'TODO: add a test to click on the execute button, before the add table dialog is closed.
887 ix = TableName.getItemCount
890 TableName.TypeKeys "<ADD>"
891 'printlog "ix = " + ix
892 'printlog "TableName.getItemCount = " + TableName.getItemCount
893 if TableName.getItemCount > ix then
894 ix = TableName.getItemCount
895 'printlog "TableName.getItemCount > ix"
897 'printlog "TableName.getSeltext = " + TableName.getSeltext
898 if TableName.getSeltext = sTableName then
902 if TableName.getSeltext <> sTableName then
903 warnlog "Can find the table " + sTableName + "." + _
904 "Make sure that the table exists when starting this test."
908 if Messagebox.Exists(3) then
909 if Messagebox.getRT = 304 then
916 printlog "- Add " + sTableName +" table to query design"
917 '/// Add database table to Query.
920 if AddTables.exists(2) then
921 CloseDlg.Click ' When the AddTables dialog still exists then close him
924 fChooseTableInQueryAddTableDialog = true
927 '--------------------------------------------------------------------
928 function fChooseQueryInQueryAddTableDialog(sQueryName as string) as boolean
932 if ( not AddTables.exists(1) ) then
933 fChooseQueryInQueryAddTableDialog = false
939 'TODO: add a test to click on the execute button, before the add table dialog is closed.
942 ix = QueryName.getItemCount
945 QueryName.TypeKeys "<ADD>"
946 'printlog "ix = " + ix
947 'printlog "TableName.getItemCount = " + TableName.getItemCount
948 if QueryName.getItemCount > ix then
949 ix = QueryName.getItemCount
950 'printlog "TableName.getItemCount > ix"
952 'printlog "TableName.getSeltext = " + TableName.getSeltext
953 if QueryName.getSeltext = sQueryName then
957 if QueryName.getSeltext <> sQueryName then
958 warnlog "Can find the table " + sTableName + "." + _
959 "Make sure that the table exists when starting this test."
963 if Messagebox.Exists(3) then
964 if Messagebox.getRT = 304 then
971 printlog "- Add " + sQueryName +" table to query design"
972 '/// Add database table to Query.
975 if AddTables.exists(2) then
976 CloseDlg.Click ' When the AddTables dialog still exists then close him
979 fChooseQueryInQueryAddTableDialog = true