Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 113091
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T02:38:52+00:00 2026-05-11T02:38:52+00:00

I have a relatively simple select statement in a VB6 program that I have

  • 0

I have a relatively simple select statement in a VB6 program that I have to maintain. (Suppress your natural tendency to shudder; I inherited the thing, I didn’t write it.)

The statement is straightforward (reformatted for clarity):

select distinct     b.ip_address  from     code_table a,     location b  where     a.code_item = b.which_id and     a.location_type_code = '15' and     a.code_status = 'R' 

The table in question returns a list of IP addresses from the database. The key column in question is code_status. Some time ago, we realized that one of the IP addresses was no longer valid, so we changed its status to I (invalid) to exclude it from appearing in the query’s results.

When you execute the query above in SQL Plus, or in SQL Developer, everything is fine. But when you execute it from VB6, the check against code_status is ignored, and the invalid IP address appears in the result set.

My first guess was that the results were cached somewhere. But, not being an Oracle expert, I have no idea where to look.

This is ancient VB6 code. The SQL is embedded in the application. At the moment, I don’t have time to rewrite it as a stored procedure. (I will some day, given the chance.) But, I need to know what would cause this disparity in behavior and how to eliminate it. If it’s happening here, it’s likely happening somewhere else.

If anyone can suggest a good place to look, I’d be very appreciative.

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T02:38:52+00:00Added an answer on May 11, 2026 at 2:38 am

    Some random ideas:

    • Are you sure you committed the changes that invalidate the ip-address? Can someone else (using another db connection / user) see the changed code_status?

    • Are you sure that the results are not modified after they are returned from the database?

    • Are you sure that you are using the ‘same’ database connection in SQLPlus as in the code (database, user etc.)?

    • Are you sure that that is indeed the SQL sent to the database? (You may check by tracing on the Oracle server or by debugging the VB code). Reformatting may have changed ‘something’.

    Off the top of my head I can’t think of any ‘caching’ that might ‘re-insert’ the unwanted ip. Hope something from the above gives you some ideas on where to look at.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 122k
  • Answers 122k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer In Objective-C, all object references are pointers, so you always… May 12, 2026 at 12:50 am
  • Editorial Team
    Editorial Team added an answer from myObjectList in myObjectDictionary.Values from myObject in myObjectList.Distinct() group myObject… May 12, 2026 at 12:50 am
  • Editorial Team
    Editorial Team added an answer You can (ab)use the text direction warning, evil ahead: <div… May 12, 2026 at 12:50 am

Related Questions

I need to run a couple of relatively simple SQL update statements to update
I have a relatively simple form which asks a variety of questions. One of
I have an Access database. Let's pretend it's for a pet store. There's a
I'm encountering some peculiarities with LINQ to SQL. With a relatively simple query, I

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.