Automating QTP Test Automation Home Automation Articles Downloads QTP Gotchas Links Books Contact About Site Map
SQL Function - ExecuteThis function executes the passed string after connecting to the database using a named DSN ODBC connection. Download it Here (right-click and then save target as). (NOTE - you can just cut & paste from below, but the formatting will have multiple spaces instead of tabs).
'=========================================================================
Sub zSql_Execute(sDsn, sSql) Dim oCon Set oCon=CreateObject("ADODB.Connection") oCon.Open("DSN=" & sDsn) oCon.Execute sSql oCon.Close Set oCon=Nothing End Sub '========================================================================= |