Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
VB Databases Basics Beginning-level VB coding questions specific to using VB with databases. Issues not specific to database use will be redirected to other forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB Databases Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 17th, 2007, 01:23 AM
Authorized User
 
Join Date: May 2007
Location: Chennai, Tamilnadu, India.
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to MathLearner
Default Error msg 3021

hi:)

    Dim rspara As New ADODB.Recordset
Me.Frame2.Enabled = True
Me.cb_exit.Enabled = True
Me.start.Enabled = True
Me.cb_Options.Enabled = True
Me.cb_print.Enabled = True
rspara.Open "select * from Parameter_Setting where set_code=5 and status=1", dbconn, adOpenKeyset, adLockReadOnly
If rspara!status = 0 Then
Me.Order_Card.Enabled = False
Else
Me.Order_Card.Enabled = True
End If
Me.Flex.Enabled = True
Me.cb_Sel_Match.Enabled = True
Me.cb_cut_order.Enabled = True
Me.From_Date.Enabled = True
Me.To_Date.Enabled = True
rspara.Close


When I run this function I face an error message "3021" with the following statement:

"Either BOF or EOF is true, or the current record has been deleted. Requested operation requires a current record."

I am not sure what I am doing wrong here.

Please help.

Thanks in advance ...

Reply With Quote
  #2 (permalink)  
Old May 17th, 2007, 07:41 AM
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

hi there..

there is anything wrong with this, the only thing that is happening is that your query doesn't return a row ;)

try that query in a query analizer to see if that return something...

to avoid this problem test for both .eof and .bof before trying to read an actual value.

HTH

Gonzalo

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
My programs achieved a new certification (can you say the same?):
WORKS ON MY MACHINE
http://www.codinghorror.com/blog/archives/000818.html
================================================== =========
I know that CVS was evil, and now i got the proof:
http://worsethanfailure.com/Articles...-Hate-You.aspx
================================================== =========
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
error msg almotions ASP.NET 2.0 Basics 3 February 12th, 2008 08:34 AM
error msg aspsuraj BOOK: Wrox's ASP.NET 2.0 Visual Web Developer 2005 Express Edition Starter ISBN: 978-0-7645-8807-5 1 November 27th, 2006 08:30 PM
error msg not sure how to code this De-zypher Classic ASP Basics 1 May 24th, 2006 04:05 PM
runtime error 3021-no current record togs74 Access 1 July 30th, 2005 02:10 AM
Error 3021 - No Current Record JackNimble BOOK: Expert One-on-One Access Application Development 5 October 2nd, 2004 03:26 PM



All times are GMT -4. The time now is 12:00 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.