ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old March 11th, 2003, 11:33 AM
sienaluke sienaluke is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 1 sienaluke User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Checking the state of a recordset

i have a long query and would like to be able to check it to see if it is
done yet and do a loop if it is not

this is what i'm doing

CONN_STRING = "PROVIDER=" & ProviderName & ";DRIVER=" & DriverName
& ";SERVER=" & ServerName & ";DATABASE=Oasis_Depot;UID=" & UID & ";PWD=" &
PWD
set cmd = server.CreateObject("adodb.command")

sql = "exec spt_time_delay '" & request("time") & "'"

cmd.ActiveConnection = conn_string
cmd.CommandText = sql
cmd.CommandTimeout = 0
set rs = cmd.Execute(sql,,adAsyncExecute)

the query that i'm running is a time delay that waits for a period of
time. what i want to do is while it is waiting for the query i want check
the state of the recordset to see if it is done querying yet and if it
isn't then i want to go into a loop until it is done. i am having
problems with recordset state property and how it works

any help would be helpful -Luke
---

Your message: (INMAIL-ID:428751)

X-Mailer: P2P web interface
Date: Tue, 11 Mar 2003 16:36:16
From: "lucas holmquist" <lholmquist@humgroup.com>
To: URL
Subject: the state of a recordset

i have a long query and would like to be able to check it to see if it is
done yet and do a loop if it is not

this is what i'm doing

CONN_STRING = "PROVIDER=" & ProviderName & ";DRIVER=" & DriverName
& ";SERVER=" & ServerName & ";DATABASE=Oasis_Depot;UID=" & UID & ";PWD=" &
PWD
set cmd = server.CreateObject("adodb.command")

sql = "exec spt_time_delay '" & request("time") & "'"

cmd.ActiveConnection = conn_string
cmd.CommandText = sql
cmd.CommandTimeout = 0
set rs = cmd.Execute(sql,,adAsyncExecute)

the query that i'm running is a time delay that waits for a period of
time. what i want to do is while it is waiting for the query i want check
the state of the recordset to see if it is done querying yet and if it
isn't then i want to go into a loop until it is done. i am having
problems with recordset state property and how it works

any help would be helpful -Luke

Reply With Quote
  #2  
Old December 4th, 2003, 11:46 AM
MZee MZee is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 1 MZee User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
You can check the state of a recordset by

if recordset.state = ... (e.g. adstateopen) then
...
end if

Hope it helped,
M.Zee

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingASP Development > Checking the state of a recordset


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap