Saturday, February 25, 2012
Really interesting behaviour of ADO
I am inserting record with times when SP begins and ends
and I log times when ADO.command.exec starts and ends
I've noticed that there are situations where SP reports 13 ms from begin to end
and ADO reports 3 seconds from begin to end. It happens about 3 times per 2000 tries.
Note: There are no resultsets, only OUTPUT params.
SO it looks to me either ADO glitch or network or what?
Does someone had something like this?
Are you accounting for the time it takes to open a connection to the
database, and then get results back from SQL Server?
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"Ruslan Osmonov" <Ruslan Osmonov@.discussions.microsoft.com> wrote in message
news:C6C63E47-DD24-449E-9885-68663277B034@.microsoft.com...
Hell all,
I am inserting record with times when SP begins and ends
and I log times when ADO.command.exec starts and ends
I've noticed that there are situations where SP reports 13 ms from begin to
end
and ADO reports 3 seconds from begin to end. It happens about 3 times per
2000 tries.
Note: There are no resultsets, only OUTPUT params.
SO it looks to me either ADO glitch or network or what?
Does someone had something like this?
|||1. No I do not, I have connection open, it is just straight execute of SP.
2. There are no resultsets back to client, only OUTPUT Params, the rest 1998 cases have SP and ADO with almost the same time.
"Narayana Vyas Kondreddi" wrote:
> Are you accounting for the time it takes to open a connection to the
> database, and then get results back from SQL Server?
> --
> HTH,
> Vyas, MVP (SQL Server)
> http://vyaskn.tripod.com/
> Is .NET important for a database professional?
> http://vyaskn.tripod.com/poll.htm
>
> "Ruslan Osmonov" <Ruslan Osmonov@.discussions.microsoft.com> wrote in message
> news:C6C63E47-DD24-449E-9885-68663277B034@.microsoft.com...
> Hell all,
> I am inserting record with times when SP begins and ends
> and I log times when ADO.command.exec starts and ends
> I've noticed that there are situations where SP reports 13 ms from begin to
> end
> and ADO reports 3 seconds from begin to end. It happens about 3 times per
> 2000 tries.
> Note: There are no resultsets, only OUTPUT params.
> SO it looks to me either ADO glitch or network or what?
> Does someone had something like this?
>
>
|||Are you accounting for the time it takes to open a connection to the
database, and then get results back from SQL Server?
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"Ruslan Osmonov" <Ruslan Osmonov@.discussions.microsoft.com> wrote in message
news:C6C63E47-DD24-449E-9885-68663277B034@.microsoft.com...
Hell all,
I am inserting record with times when SP begins and ends
and I log times when ADO.command.exec starts and ends
I've noticed that there are situations where SP reports 13 ms from begin to
end
and ADO reports 3 seconds from begin to end. It happens about 3 times per
2000 tries.
Note: There are no resultsets, only OUTPUT params.
SO it looks to me either ADO glitch or network or what?
Does someone had something like this?
|||1. No I do not, I have connection open, it is just straight execute of SP.
2. There are no resultsets back to client, only OUTPUT Params, the rest 1998 cases have SP and ADO with almost the same time.
"Narayana Vyas Kondreddi" wrote:
> Are you accounting for the time it takes to open a connection to the
> database, and then get results back from SQL Server?
> --
> HTH,
> Vyas, MVP (SQL Server)
> http://vyaskn.tripod.com/
> Is .NET important for a database professional?
> http://vyaskn.tripod.com/poll.htm
>
> "Ruslan Osmonov" <Ruslan Osmonov@.discussions.microsoft.com> wrote in message
> news:C6C63E47-DD24-449E-9885-68663277B034@.microsoft.com...
> Hell all,
> I am inserting record with times when SP begins and ends
> and I log times when ADO.command.exec starts and ends
> I've noticed that there are situations where SP reports 13 ms from begin to
> end
> and ADO reports 3 seconds from begin to end. It happens about 3 times per
> 2000 tries.
> Note: There are no resultsets, only OUTPUT params.
> SO it looks to me either ADO glitch or network or what?
> Does someone had something like this?
>
>
Really interesting behaviour of ADO
I am inserting record with times when SP begins and ends
and I log times when ADO.command.exec starts and ends
I've noticed that there are situations where SP reports 13 ms from begin to
end
and ADO reports 3 seconds from begin to end. It happens about 3 times per 20
00 tries.
Note: There are no resultsets, only OUTPUT params.
SO it looks to me either ADO glitch or network or what?
Does someone had something like this?Are you accounting for the time it takes to open a connection to the
database, and then get results back from SQL Server?
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"Ruslan Osmonov" <Ruslan Osmonov@.discussions.microsoft.com> wrote in message
news:C6C63E47-DD24-449E-9885-68663277B034@.microsoft.com...
Hell all,
I am inserting record with times when SP begins and ends
and I log times when ADO.command.exec starts and ends
I've noticed that there are situations where SP reports 13 ms from begin to
end
and ADO reports 3 seconds from begin to end. It happens about 3 times per
2000 tries.
Note: There are no resultsets, only OUTPUT params.
SO it looks to me either ADO glitch or network or what?
Does someone had something like this?|||1. No I do not, I have connection open, it is just straight execute of SP.
2. There are no resultsets back to client, only OUTPUT Params, the rest 199
8 cases have SP and ADO with almost the same time.
"Narayana Vyas Kondreddi" wrote:
> Are you accounting for the time it takes to open a connection to the
> database, and then get results back from SQL Server?
> --
> HTH,
> Vyas, MVP (SQL Server)
> http://vyaskn.tripod.com/
> Is .NET important for a database professional?
> http://vyaskn.tripod.com/poll.htm
>
> "Ruslan Osmonov" <Ruslan Osmonov@.discussions.microsoft.com> wrote in messa
ge
> news:C6C63E47-DD24-449E-9885-68663277B034@.microsoft.com...
> Hell all,
> I am inserting record with times when SP begins and ends
> and I log times when ADO.command.exec starts and ends
> I've noticed that there are situations where SP reports 13 ms from begin t
o
> end
> and ADO reports 3 seconds from begin to end. It happens about 3 times per
> 2000 tries.
> Note: There are no resultsets, only OUTPUT params.
> SO it looks to me either ADO glitch or network or what?
> Does someone had something like this?
>
>
Really basic question about inserting data into a SQL database
Hi everyone,
I'm new to programming, and trying to learn and can't seem to find a clear-cut answer on how to insert text from a textbox into a database as a new record. I have a textbox and a button that when the button_click even is fired, that it will insert the data from the textbox as a new record. Any help will be greatly appreciated!!
If it's SQL Server you can do something like this (in C#)
SqlConnection conn = new SqlConnection("Server=<servername>;Database=<dbName>;Integrated Security=true");
conn.Open();
string sql = "Insert into.... the rest of your insert statement";
SqlCommand cmd = new SqlCommand(sql, conn);
cmd.ExecuteNonQuery();
conn.Close();
Or you can modify that a bit and use a stored procedure if that suits your needs better. If you need to connect with a username/password just remove the integrated security part of the connection string and add the username/password.
Hope that helps.
|||i'm using Visual Basic
to perform an insert
when a button add is pressed
its surpose to insert the data from a textbox to the database
the data type of the tables column is char(4)
its similar to the top code but u have to add some other stuff do u know what they are
Really basic question about inserting data into a SQL database
Hi everyone,
I'm new to programming, and trying to learn and can't seem to find a clear-cut answer on how to insert text from a textbox into a database as a new record. I have a textbox and a button that when the button_click even is fired, that it will insert the data from the textbox as a new record. Any help will be greatly appreciated!!
If it's SQL Server you can do something like this (in C#)
SqlConnection conn = new SqlConnection("Server=<servername>;Database=<dbName>;Integrated Security=true");
conn.Open();
string sql = "Insert into.... the rest of your insert statement";
SqlCommand cmd = new SqlCommand(sql, conn);
cmd.ExecuteNonQuery();
conn.Close();
Or you can modify that a bit and use a stored procedure if that suits your needs better. If you need to connect with a username/password just remove the integrated security part of the connection string and add the username/password.
Hope that helps.
|||i'm using Visual Basic
to perform an insert
when a button add is pressed
its surpose to insert the data from a textbox to the database
the data type of the tables column is char(4)
its similar to the top code but u have to add some other stuff do u know what they are