| Author |
Message |
jagadeesh_qc
Joined: 01 Sep 2006 Posts: 1
|
Posted: Fri Sep 01, 2006 10:55 am Post subject: Can We Insert New Reocrd By Using Ants Load |
|
|
Hi All,
Can We Insert a New Reocrd By Using Ants Load script in Database. If yes What are the steps?
Thank You,
Jagadeesh |
|
| Back to top |
|
 |
Brian Donahue
Joined: 23 Aug 2004 Posts: 6369 Location: Red Gate Software
|
Posted: Mon Sep 11, 2006 6:43 pm Post subject: |
|
|
Hello,
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
Technical Support
Red Gate Software Ltd.
44 (0)870 160 0037 ext 8521
US and CAN 1-866-RED GATE ext 8521 |
|
| Back to top |
|
 |
tommyjjohnson
Joined: 03 Jan 2007 Posts: 3
|
Posted: Wed Jan 03, 2007 10:34 pm Post subject: I've accomplished this task very easily |
|
|
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
Try
con = New System.Data.SqlClient.SqlConnection("Server=dbtest1;database=nevada;uid=xxxx;pwd=xxxx")
con.Open()
com = New System.Data.SqlClient.SqlCommand(QueryName, con)
com.CommandType = Data.CommandType.StoredProcedure
com.CommandTimeout = 2400
com.ExecuteNonQuery()
Catch ex As Exception
If Me.Id < 2 Then
AntsHelper.Tracker.SendToExternalHtml("c:\loadtest\hyperthreading.htm", ex.ToString(), " ")
End If
Result = "ERROR"
Finally
If con.State <> Data.ConnectionState.Closed Then
con.Close()
End If
com.Dispose()
con.Dispose()
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. |
|
| Back to top |
|
 |
|
|
All times are GMT + 1 Hour
|
| Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group