ContributionsMost RecentMost LikesSolutionsRe: ado recordsets wrong with datatype text Hello, Support suggested to configure an ODBC data source on the windows system and to make sure the checkbox for dynamic cursor usage is checked: Then the connection string has to be changed to: let connectionString = "Provider=MSDASQL.1;Persist Security Info=False;Data Source=configuredDataSource;"; This changes the behaviour, but there are still wrong values in the recordset. At this point Support endorsed my anxiety that the error is not derived from TestComplete but from the mechanism that is used to connect to the database. Unfortunately my final conclusion is that adoDB does not work properly with mariaDB databases. Therefore there is no solution to accept. Kind regards S_Seydel Re: Can we pass a Object in argument of a function. Hi Kaiiii, how about defining a variable of the object type on project level or project suite level, using that to store your object and as parameter for your function Validate. Regards S_Seydel ado recordsets wrong with datatype text Hello, for the last 3-4 years our test object had a MySQL database, lately this was changed to a MariaDb database. On the MariaDb database when a table column is datatype text, mediumtext or longtext an ado recordset opened from my javascript script in TestComplete always contains the first tupel two times and the last tupel is missing. When I run the same code, with a different connectionstring of course, against a MySQL database the recordset's content is correct. My code: // Opens a connection to the used database. function openDatabaseConnection() { // Check if a connection is open. If a connection is open, close it and set it to false. if (connection) { connection.Close(); connection = false; } // Build the connection string (MariaDB) let connectionString = "Driver={MariaDB ODBC 3.1 Driver};" + "TCPIP = 1;" + "SERVER= 192.168.178.33;" + "UID= TestUser;" + "PWD= TestPassword;" + "DATABASE= testMariaDb;" + "CHARSET=utf8"; // Build the connection string (MySQL) // let connectionString = "Provider=MSDASQL;" + // "Driver={MySQL ODBC 8.0 Unicode Driver};" + // "Server= 192.168.178.26;" + // "Database= testMariaDb;" + // "Uid= TestUser;" + // "Pwd= TestPassword;"; var connection = Sys.OleObject("ADODB.Connection"); connection.ConnectionString = connectionString; connection.Open(); return connection; } // Get the collection of tupels we want to work with. function openRecordset() { // Open the database connection. let connection = openDatabaseConnection(); // Check if a recordset is open. If a recordset is open, close it and set it to false. if (recordset) { recordset.Close(); recordset = false; } // Define the database table to get the recordset from. let table = "testTable"; // Additional parameters we need for the open method (ADO recordset). // CursorTypeEnum is adOpenDynamic. let cursorTypeEnum = 2; // LockTypeEnum is adLockOptimistic. let lockTypeEnum = 3; // CommandTypeEnum is adCmdUnknown. let commandTypeEnum = 8; var recordset = Sys.OleObject("ADODB.Recordset"); // All is set, now let's open the recordset. recordset.Open(table, connection, cursorTypeEnum, lockTypeEnum, commandTypeEnum); // Fill the recordset's content into an array to inspect it while debugging. let recordsetArray = new Array(recordset.GetRows()); return recordset; } The database table to get the recordset from: The recordset's content using a MySQL database: The recordset's content using a MariaDb database: I can't figure out where the problem is and would be very thankful for any help. Best Regards S_Seydel SolvedRe: JScript to JavaScript conversion and adoDB delete That did it. Thank you very much for the very fast reply. JScript to JavaScript conversion and adoDB delete Greetings, I currently work on converting the language of my scripts from JScript to JavaScript. So far Smartbear's documentations on this topic JavaScript for JScript Users and Converting Scripts From One Scripting Language To Another were very helpful. However at this point I face a problem I was not able to find a solution for so far. To delete tupils from a database I use the following funtion: /* * Delete tupels from a database table * Value parameter can be datatype object with value null * * @param table = mandatory; string; the database table to search; * @param column = mandatory; string; the database table's column to search; * @param value = mandatory; string; the value to search for in the database table's column; */ function adoDelete(table, column, value) { // Open the database connection var connection = openDatabaseConnection(); // Open the recordset we need var recordset = openRecordset(connection, table); // Iterate through the recordset and delete all appropriate tupels recordset.MoveFirst; while(equal(recordset.EOF, false)) { if (equal(recordset.Fields.Item(column).Value, value)) { recordset.Delete; } recordset.MoveNext; } } Using JScript this function ran fine for the last two years. Using JavaScript all code lines are executed without producing an error message, but the tupil in the database is not deleted. Therefore the function runs for an infinite time, or until it is manually interrupted. From debugging I know that the correct tupel was found when the if -block is executed. Perhaps a kind community member has an idea, why the behaviour differs and how a solution could look like? Thank you in advance Sönke SolvedRe: ClickItem Intermittently Fails Hi, I had the same issue and contacted support. Smartbear was able to provide me with a patch which solved the problem just fine. Drawback is it has a negative effect on Internet Explorer's memory consumption, which they want to solve before including it in a new TC version. I close the browser after each test run and open it again before the next, that way the higtened memory consumption has little to no impact on my test experience. The patch I use is for TC version 12.42. I recommend you to contact support, I think there is a good chance your issue is the same I had and in that case the patch to solve it would already be waiting for you.. Regards, S_Seydel Re: Browser.Page(mypage).close() in edge Hi, I use the latest version of TestComplete, 12.30.1651.7. The Favorites bar in edge is disabled and the browser was restarted. Re: Browser.Page(mypage).close() in edge During a normal script run your guess is correct, indeed the url is called not in the new opened tab, but in the tab which was opened with the browser start. So here is really a behaviour to improve. However when the script is run in debug mode the url is called correctly in the new tab. From that point on the problematic behaviour regarding closing the browser instead of the page only stays exactly the same. During my investigation of the problem I had to notice more unpleasant behaviours of TestComplete with Edge. Objects are highlighted at different locations than they are visible on the screen, in object browser alert windows are not existent and the object browser does only show completely black pictures of the whole object hierarchy of the edge process. Therefore I think it's better to open a support case. Thank you for your help. Re: Browser.Page(mypage).close() in edge Hi, the German expression in the highlighted log entry "und 1 weitere Seite" is in English "and 1 additional page". When I double click the highlighted entry it is going to the last line of script code: Sys.Browser(testedBrowser).Page(cleanupScriptUrl).Close(); When I double click the last log entry it is going to the very same line of code. Browser.Page(mypage).close() in edge Hi, I experience a strange behaviour in edge executing the following code: function cleanUpWorld() { var testedBrowser = ProjectSuite.Variables.testedBrowser; var cleanupScriptUrl = ProjectSuite.Variables.BaseURL + "tools/testing_start_apo.php"; // Checks if the currently for test runs used browser is already running. if(! Sys.WaitBrowser(testedBrowser).Exists) { // If the browser is not running, starts it. Browsers.Item(testedBrowser).Run(); } // Opens a new tab. Sys.Browser(testedBrowser).BrowserWindow(0).Keys("^t"); // Opens URL to run the php cleanup script "testing_start_apo.php". Sys.Browser(testedBrowser).ToUrl(cleanupScriptUrl); // Closes the tab in which the url was opened. Sys.Browser(testedBrowser).Page(cleanupScriptUrl).Close(); } When executing the function in Internet Explorer, everything works just fine. A new tab is opened, in that new tab the page with the correct url is opened, the tab is closed and Internet Explorer stays active. When executing the function in Edge, when the tab in which the url was opened shall be closed, both the page and the browser are closed, instead of the page only. When I execute the test operations manually without TestComplete, Edge behaves as it should and stays open. The following picture shows both test logs, one for a test run with Edge, one for a test run with Internet Explorer: Both browsers were prepared for testing as described in the Test Complete documentation. When Edge is used in TestComplete options the checkbox is checked for "Enable support for testing Windows Store applications". Does anyone know why the whole edge browser is closed instead of the page only?