Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Only 10 records updating

Status
Not open for further replies.

gottaski

Programmer
Jan 4, 2001
17
US
<%@ Language=VBScript %>
<!-- #include file = &quot;../dbConnection.asp&quot; -->
<%

Set cmd = Server.CreateObject(&quot;ADODB.Command&quot;)
Set cmd.ActiveConnection = dataConn
cmd.CommandText = &quot;MainCalculationBatch&quot;
cmd.CommandType = 4
cmd.Parameters.Refresh
cmd.Parameters(&quot;@run_date&quot;) = #1/15/01#
Set rs = cmd.Execute
%>

when i run this code, only the first 10 records in my table are
updated. currently there are 411 in the table. however, if i run the
stored procedure from SQL Server Query Analyzer, all of the records are
updated. the query, in the query analyzer takes about 5 seconds -- it's
fairly complex and uses a sql server cursor.

has anyone encountered this before? is there a setting that i don't
know about that is causing the web page to stop @ 10 records.

i have also adjusted the connectiontimeout = 500 and the commandtimeout
= 500

but this code updates those 10 records in about 1 second so it's not
timing out.

i'm completely stumped!

any help would be greatly appreciated.

thanks
 
I think the error is in the line below
cmd.Parameters(&quot;@run_date&quot;) = #1/15/01#
if u are using vbscript u have to put them in &quot;&quot; and see if it works
cmd.Parameters(&quot;@run_date&quot;) = &quot;#1/15/01#&quot;

Hope this helps..
________

George
 
The error might be in the way you are using the parameters.

If I remember right, you need to assign parameters like so:
cmd.Parameters.Append cmd.CreateParameter(&quot;@rundate&quot;,adVarChar,AdParamInput,25,&quot;1/15/01&quot;)

You need to actually create a parameter object, then append it to the parameters collection. see

for more info
hope this helps
leo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top