-----------------------------------------------------------
New Message on BDOTNET
-----------------------------------------------------------
From: SijuInfinite
Message 6 in Discussion
This will not possible.You have to use another
connection object inside the loop and do the operation.After that close the
connection.
Siju.C
----- Original Message -----
From:
prakash-raj
To: BDOTNET
Sent: Tuesday, January 25, 2005 7:50
PM
Subject: Re: help in
datagrid(urgent)
New Message on BDOTNET
help in
datagrid(urgent)
Reply
Reply to Sender Recommend
Message 5 in
Discussion
From: prakash-raj
Thanks ,unfortunately the requirement has been changed
and it working well.
i had another query.here
sel_cmd =New SqlCommand("SELECT count(*) FROM
temp_session", Con)
Dim temp as integer =
sel_cmd.ExecuteScalar()
if temp >= 1
then
select_cmd = New SqlCommand("SELECT
ts.cid,ts.mins,cust.tot_minutes FROM temp_session ts,customers
cust where ts.cid=cust.cid", Con)
dr =
select_cmd.ExecuteReader()
dim mins as
integer
dim tot_mins as integer
While
dr.Read()
mins = 0
tot_mins =
0
mins = dr.Item("mins") +
1
tot_mins = dr.Item("tot_minutes") -
1
update_cmd = New SqlCommand("UPDATE
temp_session SET mins="& mins &" WHERE cid="&
dr.Item("cid"),Con)
update_customer = New
SqlCommand("UPDATE customers SET tot_minutes="& tot_mins
&" WHERE cid="& dr.Item("cid"),Con)
update_cmd.ExecuteNonQuery()
update_customer.ExecuteNonQuery()
End
While
dr.Close()
end if
ERROR AS
There is already an open DataReader
associated with this Connection which must be closed first in
(update_cmd.ExecuteNonQuery() )
Kindly help me
out.
Thx in advance
regards
Prakash.S
View other groups in this
category.
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/BDotNet/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member
Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you
received this message by mistake, please click the "Remove" link below. On the
pre-addressed e-mail message that opens, simply click "Send". Your e-mail
address will be deleted from this group's mailing list.
mailto:[EMAIL PROTECTED]