cn.execute in loop ?

Results 1 to 2 of 2

Thread: cn.execute in loop ?

  1. #1 Guest

    Default cn.execute in loop ?

    cn.begin transaction and cn.execute inside of LOOP<BR>8575 - 9 Aug - 09:42:01 PM<BR>--------------------------------------------------------------------------------<BR>1(I have 10 insert statements in an arrary)<BR>str(i)<BR>2(I want to loop through them and execute)<BR>cn.BeginTrans <BR>for i=0 to 9<BR>cn.execute str(i)<BR>next<BR>then <BR>cn.commit<BR>3(I keep getting this error)<BR>Error Type:<BR>Microsoft OLE DB Provider for ODBC Drivers (0x80040E0C)<BR>Command text was not set for the command object.<BR>/coa/signup/nw_signup_c.asp, line 33<BR>4(It works if I do one at a time) <BR>

  2. #2
    sm549 Guest

    Default RE: cn.execute in loop ?

    Just a shot. This always happens to me when the SQL string is empty. Are you sure all the strings are set in the array, that you&#039ve filled it 0-based? Maybe check by response writing the items out...<BR><BR>HIH

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts