473,406 Members | 2,633 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Using Recursion looping through a ADO RS

Is it possible to use a recursive function to loop through a recordset faster?

I have a table that I need to edit its contents after doing some calculation. The table has one field has an RawData field and a CalcData field. I open the recordset, exctract the RawData and after doing some calculations update the CalcData with the calculated data. In code I have something as follows.

dim rs as new ADODB.Recordset
dim cmdUpdate as new ADODB.Command
dim CalcValue as String

'Setup the Command
With cmdUpdate
.ActiveConnection = ConnStr
.CommandType=adCmdText
End With

'Setup the Recordset
With rs
.Open "select itemId from myTable", ConnStr, 1
Do While Not .EOF
calcValue = CalcFunction (.fields("itemId").value)
cmdUpdate.CommandText = "update myTable set calcData = '" & calcValue & "" where itemId = & .fields("itemId").value
cmdUpdate.update
.MoveNext
Loop
End With
Hopefully is not too confusing what I'm trying to do. The code is pretty simple but it's not as fast as I would like it to be specially because the myTable has about 1.5 million records! Maybe there is a faster way to do this instead of using ADO? Is ADO.Net faster?

--
Thank you for your help
Nov 20 '05 #1
11 2552
just some ideas...

Does a ADODB.Command object have a Prepare method? I would check into that,
it may help. Maybe using parameters would speed things up to.

Is this data in SQL server? If so can the logic behind CalcFunction be
converted to a SQL Inline UDF? This would leave all the data on the server.

HTH,
Greg

"Dacuna" <da****@houston.rr.SAYNOTOSPAM.com> wrote in message
news:EE**********************************@microsof t.com...
Is it possible to use a recursive function to loop through a recordset faster?
I have a table that I need to edit its contents after doing some calculation. The table has one field has an RawData field and a CalcData
field. I open the recordset, exctract the RawData and after doing some
calculations update the CalcData with the calculated data. In code I have
something as follows.
dim rs as new ADODB.Recordset
dim cmdUpdate as new ADODB.Command
dim CalcValue as String

'Setup the Command
With cmdUpdate
.ActiveConnection = ConnStr
.CommandType=adCmdText
End With

'Setup the Recordset
With rs
.Open "select itemId from myTable", ConnStr, 1
Do While Not .EOF
calcValue = CalcFunction (.fields("itemId").value)
cmdUpdate.CommandText = "update myTable set calcData = '" & calcValue & "" where itemId = & .fields("itemId").value cmdUpdate.update
.MoveNext
Loop
End With
Hopefully is not too confusing what I'm trying to do. The code is pretty simple but it's not as fast as I would like it to be specially because the
myTable has about 1.5 million records! Maybe there is a faster way to do
this instead of using ADO? Is ADO.Net faster?
--
Thank you for your help

Nov 20 '05 #2
SQL Inline UDF is SQL Server 2000 Inline User-Defined Function.

You could create a Store Procedure on SQL something like so:

CREATE PROCEDURE dbo.usp_MyProc

AS

UPDATE myTable
SET calcData =dbo.ufn_CalcFunction(itemId)

GO

CREATE FUNCTION dbo.ufn_CalcFuntion (
@itemID int
)
RETURNS int
BEGIN

DECLARE @calcData int

--do something here...

RETURN @calcData

END

GO

There is a big assumption here, that the logic behind CalcFuntion could be
processed on the server without outside assistance.

Search SQL Server Books Online for UDF

"Prepare" is generally a method on Command objects. It precompiles your SQL
command to make it execute faster (or something akin to that).

Greg
"Dacuna" <da****@houston.rr.SAYNOTOSPAM.com> wrote in message
news:3B**********************************@microsof t.com...
Pardon my ignorance...but what is a "SQL Inline UDF"? Yes, the data resides in a SQL server. As far as the prepare method, is this a method
that is part of the command? --
Thank you for your help
"Greg Burns" wrote:
just some ideas...

Does a ADODB.Command object have a Prepare method? I would check into that, it may help. Maybe using parameters would speed things up to.

Is this data in SQL server? If so can the logic behind CalcFunction be
converted to a SQL Inline UDF? This would leave all the data on the server.
HTH,
Greg

"Dacuna" <da****@houston.rr.SAYNOTOSPAM.com> wrote in message
news:EE**********************************@microsof t.com...
Is it possible to use a recursive function to loop through a recordset

faster?

I have a table that I need to edit its contents after doing some

calculation. The table has one field has an RawData field and a CalcData field. I open the recordset, exctract the RawData and after doing some
calculations update the CalcData with the calculated data. In code I have something as follows.

dim rs as new ADODB.Recordset
dim cmdUpdate as new ADODB.Command
dim CalcValue as String

'Setup the Command
With cmdUpdate
.ActiveConnection = ConnStr
.CommandType=adCmdText
End With

'Setup the Recordset
With rs
.Open "select itemId from myTable", ConnStr, 1
Do While Not .EOF
calcValue = CalcFunction (.fields("itemId").value)
cmdUpdate.CommandText = "update myTable set calcData = '" &

calcValue & "" where itemId = & .fields("itemId").value
cmdUpdate.update
.MoveNext
Loop
End With
Hopefully is not too confusing what I'm trying to do. The code is
pretty simple but it's not as fast as I would like it to be specially because the myTable has about 1.5 million records! Maybe there is a faster way to do this instead of using ADO? Is ADO.Net faster?

--
Thank you for your help


Nov 20 '05 #3
Dacuna,
Maybe there is a faster way to do this instead of using ADO? Is ADO.Net faster?
Both ADO & ADO.NET will be faster if you use a parameterized update
statement. Note the parameter markers (@calcValue & @itemId) in the update
statement text below.

From VB.NET ADO.NET will generally be faster then ADODB, especially with SQL
Server.

Something like (syntax checked only):

Const connectionString As String = "Data Source=localhost;Integrated
Security=SSPI;Initial Catalog=northwind"

Const selectText As String = "select itemId from myTable"
Const updateText As String = "update myTable set calcData =
@calcValue where itemId = @itemId"

Dim connection As New SqlConnection(connectionString)

Dim selectCommand As New SqlCommand(selectText, connection)

'Setup the Command
Dim updateCommand As New SqlCommand(updateText, connection)
updateCommand.Parameters.Add("@calcValue", SqlDbType.NVarChar, 80)
updateCommand.Parameters.Add("@itemId", SqlDbType.Int)
updateCommand.Prepare()

Dim reader As SqlDataReader = selectCommand.ExecuteReader()

'Setup the Recordset
Dim CalcValue as String

Do While reader.Read()
calcValue = CalcFunction(reader.Item("@itemId"))

updateCommand.Parameters("@calcValue").Value = calcValue
updateCommand.Parameters("@itemId").Value =
reader.Item("@itemId")
updateCommand.ExecuteNonQuery()
Loop

reader.Close()
connection.Close()
Maybe there is a faster way to do this instead of using ADO?
As Greg Burns suggested, creating a UDF on SQL Server & doing this entirely
server side will be generally be faster... However you need SQL Server 2000
or later for UDFs.

Hope this helps
Jay

"Dacuna" <da****@houston.rr.SAYNOTOSPAM.com> wrote in message
news:EE**********************************@microsof t.com... Is it possible to use a recursive function to loop through a recordset faster?
I have a table that I need to edit its contents after doing some calculation. The table has one field has an RawData field and a CalcData
field. I open the recordset, exctract the RawData and after doing some
calculations update the CalcData with the calculated data. In code I have
something as follows.
dim rs as new ADODB.Recordset
dim cmdUpdate as new ADODB.Command
dim CalcValue as String

'Setup the Command
With cmdUpdate
.ActiveConnection = ConnStr
.CommandType=adCmdText
End With

'Setup the Recordset
With rs
.Open "select itemId from myTable", ConnStr, 1
Do While Not .EOF
calcValue = CalcFunction (.fields("itemId").value)
cmdUpdate.CommandText = "update myTable set calcData = '" & calcValue & "" where itemId = & .fields("itemId").value cmdUpdate.update
.MoveNext
Loop
End With
Hopefully is not too confusing what I'm trying to do. The code is pretty simple but it's not as fast as I would like it to be specially because the
myTable has about 1.5 million records! Maybe there is a faster way to do
this instead of using ADO? Is ADO.Net faster?
--
Thank you for your help

Nov 20 '05 #4
Is "itemId" a unique record identifier?
If so, is it indexed as a primary key on the server?
If not, then I can see a number of things that can happen that are undesirable
given this code.
At minimum, you should include a primary key in your returned recordset and use
that key to identify record to update.
This alone will make more of a difference than whether you use ADODB vs ADO.Net,
or parameterized updates, etc. combined.

Gerald

"Dacuna" <da****@houston.rr.SAYNOTOSPAM.com> wrote in message
news:EE**********************************@microsof t.com...
Is it possible to use a recursive function to loop through a recordset faster?

I have a table that I need to edit its contents after doing some calculation. The table has one field has an RawData field and a CalcData field. I open the
recordset, exctract the RawData and after doing some calculations update the
CalcData with the calculated data. In code I have something as follows.
dim rs as new ADODB.Recordset
dim cmdUpdate as new ADODB.Command
dim CalcValue as String

'Setup the Command
With cmdUpdate
.ActiveConnection = ConnStr
.CommandType=adCmdText
End With

'Setup the Recordset
With rs
.Open "select itemId from myTable", ConnStr, 1
Do While Not .EOF
calcValue = CalcFunction (.fields("itemId").value)
cmdUpdate.CommandText = "update myTable set calcData = '" & calcValue & "" where itemId = & .fields("itemId").value cmdUpdate.update
.MoveNext
Loop
End With
Hopefully is not too confusing what I'm trying to do. The code is pretty simple but it's not as fast as I would like it to be specially because the
myTable has about 1.5 million records! Maybe there is a faster way to do this
instead of using ADO? Is ADO.Net faster?
--
Thank you for your help

Nov 20 '05 #5
% is the modulus operator in SQL

From BOL:
Examples
This example returns the book title number and any modulo (remainder) of
dividing the price (converted to an integer value) of each book into the
total yearly sales (ytd_sales * price).

USE pubs
GO
SELECT title_id,
CAST((ytd_sales * price) AS int) % CAST(price AS int) AS Modulo
FROM titles
WHERE price IS NOT NULL and type = 'trad_cook'
ORDER BY title_id
GO

Greg

"Dacuna" <da****@houston.rr.SAYNOTOSPAM.com> wrote in message
news:51**********************************@microsof t.com...
Jay,

Unfortunately my function uses modular division and I don't think SQL 2000
has that feature. One thing I will try, however, is the parametized
update statement because that is where the code slows down as it's parsing
through the recordset. As it stands, right now it takes me a little
under a second to update each record so I'm definately looking to improve
performance.

--
Thank you for your help
"Jay B. Harlow [MVP - Outlook]" wrote:
Dacuna,
> Maybe there is a faster way to do this instead of using ADO? Is
> ADO.Net

faster?
Both ADO & ADO.NET will be faster if you use a parameterized update
statement. Note the parameter markers (@calcValue & @itemId) in the
update
statement text below.

From VB.NET ADO.NET will generally be faster then ADODB, especially with
SQL
Server.

Something like (syntax checked only):

Const connectionString As String = "Data
Source=localhost;Integrated
Security=SSPI;Initial Catalog=northwind"

Const selectText As String = "select itemId from myTable"
Const updateText As String = "update myTable set calcData =
@calcValue where itemId = @itemId"

Dim connection As New SqlConnection(connectionString)

Dim selectCommand As New SqlCommand(selectText, connection)

'Setup the Command
Dim updateCommand As New SqlCommand(updateText, connection)
updateCommand.Parameters.Add("@calcValue", SqlDbType.NVarChar,
80)
updateCommand.Parameters.Add("@itemId", SqlDbType.Int)
updateCommand.Prepare()

Dim reader As SqlDataReader = selectCommand.ExecuteReader()

'Setup the Recordset
Dim CalcValue as String

Do While reader.Read()
calcValue = CalcFunction(reader.Item("@itemId"))

updateCommand.Parameters("@calcValue").Value = calcValue
updateCommand.Parameters("@itemId").Value =
reader.Item("@itemId")
updateCommand.ExecuteNonQuery()
Loop

reader.Close()
connection.Close()
> Maybe there is a faster way to do this instead of using ADO?


As Greg Burns suggested, creating a UDF on SQL Server & doing this
entirely
server side will be generally be faster... However you need SQL Server
2000
or later for UDFs.

Hope this helps
Jay

"Dacuna" <da****@houston.rr.SAYNOTOSPAM.com> wrote in message
news:EE**********************************@microsof t.com...
> Is it possible to use a recursive function to loop through a recordset

faster?
>
> I have a table that I need to edit its contents after doing some

calculation. The table has one field has an RawData field and a CalcData
field. I open the recordset, exctract the RawData and after doing some
calculations update the CalcData with the calculated data. In code I
have
something as follows.
>
> dim rs as new ADODB.Recordset
> dim cmdUpdate as new ADODB.Command
> dim CalcValue as String
>
> 'Setup the Command
> With cmdUpdate
> .ActiveConnection = ConnStr
> .CommandType=adCmdText
> End With
>
> 'Setup the Recordset
> With rs
> .Open "select itemId from myTable", ConnStr, 1
> Do While Not .EOF
> calcValue = CalcFunction (.fields("itemId").value)
> cmdUpdate.CommandText = "update myTable set calcData = '" &

calcValue & "" where itemId = & .fields("itemId").value
> cmdUpdate.update
> .MoveNext
> Loop
> End With
>
>
> Hopefully is not too confusing what I'm trying to do. The code is
> pretty

simple but it's not as fast as I would like it to be specially because
the
myTable has about 1.5 million records! Maybe there is a faster way to do
this instead of using ADO? Is ADO.Net faster?
>
> --
> Thank you for your help


Nov 20 '05 #6
Prepared will only make a difference if you are using parameters...

"Dacuna" <da****@houston.rr.SAYNOTOSPAM.com> wrote in message
news:00**********************************@microsof t.com...
Greg,

Thanks for the pointers.

settings the prepared property to TRUE did not help.

I have not messed with UDFs much (looked it up in google, you lost me with
the acronym for a second). I guess if Functions in SQL can handle modular
division and looping I guess I could give it a try.
--
Thank you for your help
"Greg Burns" wrote:
just some ideas...

Does a ADODB.Command object have a Prepare method? I would check into
that,
it may help. Maybe using parameters would speed things up to.

Is this data in SQL server? If so can the logic behind CalcFunction be
converted to a SQL Inline UDF? This would leave all the data on the
server.

HTH,
Greg

"Dacuna" <da****@houston.rr.SAYNOTOSPAM.com> wrote in message
news:EE**********************************@microsof t.com...
> Is it possible to use a recursive function to loop through a recordset

faster?
>
> I have a table that I need to edit its contents after doing some

calculation. The table has one field has an RawData field and a CalcData
field. I open the recordset, exctract the RawData and after doing some
calculations update the CalcData with the calculated data. In code I
have
something as follows.
>
> dim rs as new ADODB.Recordset
> dim cmdUpdate as new ADODB.Command
> dim CalcValue as String
>
> 'Setup the Command
> With cmdUpdate
> .ActiveConnection = ConnStr
> .CommandType=adCmdText
> End With
>
> 'Setup the Recordset
> With rs
> .Open "select itemId from myTable", ConnStr, 1
> Do While Not .EOF
> calcValue = CalcFunction (.fields("itemId").value)
> cmdUpdate.CommandText = "update myTable set calcData = '" &

calcValue & "" where itemId = & .fields("itemId").value
> cmdUpdate.update
> .MoveNext
> Loop
> End With
>
>
> Hopefully is not too confusing what I'm trying to do. The code is
> pretty

simple but it's not as fast as I would like it to be specially because
the
myTable has about 1.5 million records! Maybe there is a faster way to do
this instead of using ADO? Is ADO.Net faster?
>
> --
> Thank you for your help


Nov 20 '05 #7
Dacuna,
As Greg states, % is the modulo division operator in SQL 2000.

Also as Cablewizard suggests, does your SQL Server myTable table have a
unique index or primary key constraint on itemId?

If you give the statement "update myTable set calcData = 'something' where
itemId = 20" to SQL Server Query Analyzer, what kind of executation plan
does it say its going to use.

What does Query Analyzer say about the statement "update myTable set
calcData = @calcValue where itemId = @itemId"?

Hope this helps
Jay

"Dacuna" <da****@houston.rr.SAYNOTOSPAM.com> wrote in message
news:51**********************************@microsof t.com...
Jay,

Unfortunately my function uses modular division and I don't think SQL 2000 has that feature. One thing I will try, however, is the parametized update
statement because that is where the code slows down as it's parsing through
the recordset. As it stands, right now it takes me a little under a second
to update each record so I'm definately looking to improve performance.
--
Thank you for your help
"Jay B. Harlow [MVP - Outlook]" wrote:
Dacuna,
Maybe there is a faster way to do this instead of using ADO? Is
ADO.Net faster?
Both ADO & ADO.NET will be faster if you use a parameterized update
statement. Note the parameter markers (@calcValue & @itemId) in the update statement text below.

From VB.NET ADO.NET will generally be faster then ADODB, especially with SQL Server.

Something like (syntax checked only):

Const connectionString As String = "Data Source=localhost;Integrated Security=SSPI;Initial Catalog=northwind"

Const selectText As String = "select itemId from myTable"
Const updateText As String = "update myTable set calcData =
@calcValue where itemId = @itemId"

Dim connection As New SqlConnection(connectionString)

Dim selectCommand As New SqlCommand(selectText, connection)

'Setup the Command
Dim updateCommand As New SqlCommand(updateText, connection)
updateCommand.Parameters.Add("@calcValue", SqlDbType.NVarChar, 80) updateCommand.Parameters.Add("@itemId", SqlDbType.Int)
updateCommand.Prepare()

Dim reader As SqlDataReader = selectCommand.ExecuteReader()

'Setup the Recordset
Dim CalcValue as String

Do While reader.Read()
calcValue = CalcFunction(reader.Item("@itemId"))

updateCommand.Parameters("@calcValue").Value = calcValue
updateCommand.Parameters("@itemId").Value =
reader.Item("@itemId")
updateCommand.ExecuteNonQuery()
Loop

reader.Close()
connection.Close()
Maybe there is a faster way to do this instead of using ADO?


As Greg Burns suggested, creating a UDF on SQL Server & doing this entirely server side will be generally be faster... However you need SQL Server 2000 or later for UDFs.

Hope this helps
Jay

"Dacuna" <da****@houston.rr.SAYNOTOSPAM.com> wrote in message
news:EE**********************************@microsof t.com...
Is it possible to use a recursive function to loop through a recordset

faster?

I have a table that I need to edit its contents after doing some

calculation. The table has one field has an RawData field and a CalcData field. I open the recordset, exctract the RawData and after doing some
calculations update the CalcData with the calculated data. In code I have something as follows.

dim rs as new ADODB.Recordset
dim cmdUpdate as new ADODB.Command
dim CalcValue as String

'Setup the Command
With cmdUpdate
.ActiveConnection = ConnStr
.CommandType=adCmdText
End With

'Setup the Recordset
With rs
.Open "select itemId from myTable", ConnStr, 1
Do While Not .EOF
calcValue = CalcFunction (.fields("itemId").value)
cmdUpdate.CommandText = "update myTable set calcData = '" &

calcValue & "" where itemId = & .fields("itemId").value
cmdUpdate.update
.MoveNext
Loop
End With
Hopefully is not too confusing what I'm trying to do. The code is
pretty simple but it's not as fast as I would like it to be specially because the myTable has about 1.5 million records! Maybe there is a faster way to do this instead of using ADO? Is ADO.Net faster?

--
Thank you for your help


Nov 20 '05 #8
Hi Dacune
Hopefully is not too confusing what I'm trying to do. The code is pretty simple but it'snot as fast as I would like it to be specially because the myTable has

about 1.5 million records! >Maybe there is a faster way to do this instead
of using ADO? Is ADO.Net faster?

A different answer than the others until now, which maybe is a question
however as well an answer, is this not typical a situation for the ADO.Net
SQLdatareader and the SQL update command?

http://msdn.microsoft.com/library/de...ClassTopic.asp

http://msdn.microsoft.com/library/de...mmandtopic.asp

However maybe I am wrong?

Cor

Nov 20 '05 #9
Cor,
is this not typical a situation for the ADO.Net
SQLdatareader and the SQL update command?
That's the way I read it, so that is why my sample used a SqlDataReader & an
update SqlCommand.

NOTE: You don't need to get an SQLDataAdapter involved, as you are not going
to be using the SqlDataAdapter.Update method all you need is the SqlCommand
itself (that you would have assigned to the SqlDataAdapter.UpdateCommand
property).

http://msdn.microsoft.com/library/de...ClassTopic.asp

Hope this helps
Jay

"Cor Ligthert" <no**********@planet.nl> wrote in message
news:ON**************@TK2MSFTNGP09.phx.gbl... Hi Dacune
Hopefully is not too confusing what I'm trying to do. The code is
pretty simple but it's
not as fast as I would like it to be specially because the myTable has about 1.5 million records! >Maybe there is a faster way to do this

instead of using ADO? Is ADO.Net faster?

A different answer than the others until now, which maybe is a question
however as well an answer, is this not typical a situation for the ADO.Net
SQLdatareader and the SQL update command?

http://msdn.microsoft.com/library/de...ClassTopic.asp
http://msdn.microsoft.com/library/de...mmandtopic.asp
However maybe I am wrong?

Cor

Nov 20 '05 #10
Hi Jay,

After good rereading it, I see that we have exactly the same idea, I readed
your message and there was the part
'Setup the recordset
That has probably brought me on the wrong idea of your solution. When I saw
that I thought it was a loop to setup a recordset (dataset) and did not read
further. Now I see it is the same as I ment.

Than it is in my opinion only good that we have very independently from each
other the same best solution for this problem. I hope that you understand
that when I had readed it as it was I had not made this previous message.

:-)

Cor
Cor,
is this not typical a situation for the ADO.Net
SQLdatareader and the SQL update command?
That's the way I read it, so that is why my sample used a SqlDataReader &

an update SqlCommand.

NOTE: You don't need to get an SQLDataAdapter involved, as you are not going to be using the SqlDataAdapter.Update method all you need is the SqlCommand itself (that you would have assigned to the SqlDataAdapter.UpdateCommand
property).

http://msdn.microsoft.com/library/de...ClassTopic.asp
Hope this helps
Jay

"Cor Ligthert" <no**********@planet.nl> wrote in message
news:ON**************@TK2MSFTNGP09.phx.gbl...
Hi Dacune
Hopefully is not too confusing what I'm trying to do. The code is pretty
simple but it's
not as fast as I would like it to be specially because the myTable has

about 1.5 million records! >Maybe there is a faster way to do this

instead
of using ADO? Is ADO.Net faster?

A different answer than the others until now, which maybe is a question
however as well an answer, is this not typical a situation for the

ADO.Net SQLdatareader and the SQL update command?

http://msdn.microsoft.com/library/de...ClassTopic.asp

http://msdn.microsoft.com/library/de...mmandtopic.asp

However maybe I am wrong?

Cor


Nov 20 '05 #11
Cor,
The "'Setup the recordset" is from the original code, I left it there as a
bread crumb so the OP knew where my code matched his code...

Hope this helps
Jay

"Cor Ligthert" <no**********@planet.nl> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Hi Jay,

After good rereading it, I see that we have exactly the same idea, I readed your message and there was the part
'Setup the recordset
That has probably brought me on the wrong idea of your solution. When I saw that I thought it was a loop to setup a recordset (dataset) and did not read further. Now I see it is the same as I ment.

Than it is in my opinion only good that we have very independently from each other the same best solution for this problem. I hope that you understand
that when I had readed it as it was I had not made this previous message.

:-)

Cor
Cor,
is this not typical a situation for the ADO.Net
SQLdatareader and the SQL update command?
That's the way I read it, so that is why my sample used a SqlDataReader & an
update SqlCommand.

NOTE: You don't need to get an SQLDataAdapter involved, as you are not

going
to be using the SqlDataAdapter.Update method all you need is the

SqlCommand
itself (that you would have assigned to the SqlDataAdapter.UpdateCommand
property).

http://msdn.microsoft.com/library/de...ClassTopic.asp

Hope this helps
Jay

"Cor Ligthert" <no**********@planet.nl> wrote in message
news:ON**************@TK2MSFTNGP09.phx.gbl...
Hi Dacune

> Hopefully is not too confusing what I'm trying to do. The code is

pretty
simple but it's
>not as fast as I would like it to be specially because the myTable has about 1.5 million records! >Maybe there is a faster way to do this

instead
of using ADO? Is ADO.Net faster?

A different answer than the others until now, which maybe is a question however as well an answer, is this not typical a situation for the

ADO.Net SQLdatareader and the SQL update command?

http://msdn.microsoft.com/library/de...ClassTopic.asp

http://msdn.microsoft.com/library/de...mmandtopic.asp

However maybe I am wrong?

Cor



Nov 20 '05 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: hokiegal99 | last post by:
A few questions about the following code. How would I "wrap" this in a function, and do I need to? Also, how can I make the code smart enough to realize that when a file has 2 or more bad...
11
by: Ken | last post by:
Hello, I have a recursive Sierpinski code here. The code is right and every line works fine by itself. I wish for all of them to call the function DrawSierpinski. But in this cae it only calls...
6
by: Thomas Mlynarczyk | last post by:
Hi, Say I have an array containing a reference to itself: $myArray = array(); $myArray =& $myArray; How can I, looping iteratively through the array, detect the fact that $myArray will "take"...
19
by: Kay Schluehr | last post by:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/496691
4
by: seninfothil | last post by:
hai i wrote a program for sudoku puzzle .... for that i need to go for recursion function . inside the function i have go for looping.... where i have call the rec..function again.. ...
10
by: Lamefif | last post by:
can anyone explain the output of this function. im having trouble comprehending it void ret_str(char* s) { if(*s != '\0') //{ cout<<*(s) ; ret_str(s+1); //cout<<*(s) ;
4
by: si4 | last post by:
Hello, I'm currently studying javascript by myself. I thought that I will write js that will remove element in the body from DOM every 2 seconds, untill all elements in the body are deleted(...
14
RMWChaos
by: RMWChaos | last post by:
Firebug is reporting "too much recursion" when I attempt to create a child element in a parent that doesn't exist yet. The script should automatically create the missing parent before going on to...
2
by: Stef Mientki | last post by:
hello, I tried to find an easy way to add properties (attributes) to a number of different components. So I wrote a class, from which all these components are derived. By trial and error I...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.