Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Searching empty string in the database

Posted on 1998-08-04
2
Medium Priority
?
205 Views
Last Modified: 2010-05-03
I am checking  all the database tables fields for empty string. I used
"do loop " statement go to each table and check  each field  FOR empty string  .It works but it seems so slow especially with large amount of data.
So is there any way of doing it? Like using any API FUNCTION???
0
Comment
Question by:ozlem
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 7

Expert Comment

by:tward
ID: 1467725
Posting some code may help to determine if/where there is a slow point.
0
 

Accepted Solution

by:
jaimereed earned 20 total points
ID: 1467726
Try creating a new recordset from the database using an SQL statement that only selects records with an empty string (note you can't use the * in criteria so you have to separately specify the field names). E.g.

set rs = theDb.OpenRecordSet("SELECT * FROM [your table] WHERE ( ( [Field1] = NULL)  OR ( [Field2]= NULL ) OR ... )"

You can then do whatever you want with the entire returned recordset. Note that this may not work if you have explicity told the database to use empty-strings rather than NULLs. If this is the case replace NULL with ''. MS Access/VB default to using NULLS (which is faster).
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question