Can We Insert New Reocrd By Using Ants Load

Forum for users of ANTS web server load testing tool

Can We Insert New Reocrd By Using Ants Load

Postby jagadeesh_qc » Fri Sep 01, 2006 9:55 am

Hi All,

Can We Insert a New Reocrd By Using Ants Load script in Database. If yes What are the steps?

Thank You,
Posts: 1
Joined: Fri Sep 01, 2006 9:41 am

Postby Brian Donahue » Mon Sep 11, 2006 5:43 pm


ANTS Load can only make web requests. If you have a web application that does the database updates, you can use ANTS Load as a harness to get it to perform many updates automatically in a short period of time. The software is mainly designed to stress-test websites rather than test their functionality is working properly, however.
Brian Donahue
Posts: 6590
Joined: Mon Aug 23, 2004 9:48 am

I've accomplished this task very easily

Postby tommyjjohnson » Wed Jan 03, 2007 9:34 pm

I've used ANTS Load to interact with a database directly, without using my Web site. All you have to do is write VB.Net code to do it. I used this example to test database performance:

Dim con As System.Data.SqlClient.SqlConnection
Dim com As System.Data.SqlClient.SqlCommand
Dim ElapsedTime As TimeSpan

con = New System.Data.SqlClient.SqlConnection("Server=dbtest1;database=nevada;uid=xxxx;pwd=xxxx")
com = New System.Data.SqlClient.SqlCommand(QueryName, con)
com.CommandType = Data.CommandType.StoredProcedure
com.CommandTimeout = 2400
Catch ex As Exception
If Me.Id < 2 Then
AntsHelper.Tracker.SendToExternalHtml("c:\\loadtest\\hyperthreading.htm", ex.ToString(), "&nbsp;")
End If
Result = "ERROR"
If con.State <> Data.ConnectionState.Closed Then
End If


ElapsedTime = DateTime.Now.Subtract(now)
AntsHelper.Tracker.SendToExternalLog("c:\\loadtest\\hyperthreading.txt", QueryName & vbTab & Result & vbTab & ElapsedTime.ToString())
End Try

Alternately, one could write an assembly, reference it, and use that. I haven't found anything that I can't do with ANTS load so far...some things are really difficult and some things are really slow, but I've been able to do them.
Posts: 3
Joined: Wed Jan 03, 2007 9:21 pm

Return to ANTS Load

Who is online

Users browsing this forum: No registered users and 0 guests