473,394 Members | 1,752 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

The search key was not found in any record for Asp.Net, Ado.Net

I am using asp.net and ado.net to update an Access 2000 database.

It works OK except, after minimal use, I get an error message:

-----------------------
"The search key was not found in any record."
System.Data.OleDb.OleDbException: The search key was not found in any
record.

Line 46: Dim objCommand As New OleDbCommand(strSql, objConn)
Line 47: objConn.Open()
Line 48: objCommand.ExecuteNonQuery()
Line 49: objConn.Close()
Line 50: End Sub
-----------------------------

This happens when I try to UPDATE a table, and only occurs
for aspecific row in the table.This is a brand new database. I created it
from scratch a few minutes ago.

Any ideas as to what the problem might be?

By the way, I notice that this seems to occur with just about every database
I use. I think the problem may have something to do with the frequency of
how often I save data to the table. When I try to save data slowly,
carefully, it works OK. When I try to save often, I get this error which
corrupts the database. I actually think that the connection to the db is
still open when I try to save again.

Does that make sense? In other words, I have a command button that runs the
ExecuteNonQuery method, and I am "testing" the database my clicking
repeatedly. When I click often, the database becomes corrupted. When I
click, then wait several seconds, then click again, no problems.

Could this repeated, fast clicking be the problem?


Nov 18 '05 #1
0 1127

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Christopher Koh | last post by:
I will make a form which will search the database (just like google interface) that will look/match for the exact name in the records of a given fieldname. Any suggestions on how to make the code?
3
by: Liz Malcolm | last post by:
Hello and TIA for guidance. I am building a reusable search procedure (thanks go to Graham Thorpe for his example that set me on my way). Everything works up until the 2nd match is found, the...
8
by: Steph | last post by:
Hi. I'm very new to MS Access and have been presented with an Access database of contacts by my employer. I am trying to redesign the main form of the database so that a button entitled...
4
by: kimimaro | last post by:
Thank you for your help I think I know what the problem is. Firstly the add_record cannot read the record.txt or something if the record.txt (in which I used it to store the details of each record)...
1
by: Eric | last post by:
Hi: I have two files. I search pattern ":" from emails text file and save email contents into a database. Another search pattern " field is blank. Please try again.", vbExclamation + vbOKOnly...
9
by: AMBLY | last post by:
Hello ! Hope someone might be able to help me with this one. I run Access2000 on XP. I have a form : frmONE- which contains a txt field: ctrCTN from my table/database. The values in ctrCTN are...
5
by: mforema | last post by:
Hi Everyone, I want to search records by typing in multiple keywords. I currently have a search form. It has a combo box, text box, Search command button, and a subform. The combo box lists the...
9
by: hrreece | last post by:
I have an Access 2002 database that has a form that can be used to review individual records. At the bottom of the form are buttons that are linked to functions that allow the user to "Find a record...
1
by: Peader | last post by:
Hi, I'm trying to complete a form that will search previous results entered in a table and return the row items based on a ID number. My current code is below: Private Sub cmd22_Click() ...
19
by: didacticone | last post by:
I created a search form that works well except when i am searching for a record that has multiple entries in the corresponding table. i would to filter the results so that they will display all the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.