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 6733465
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:46:19+00:00 2026-05-26T10:46:19+00:00

Help, any ideas?? I am using the OLEDB adapter (Oracle OLEDB) with Oracle 10.2.0.3.0.

  • 0

Help, any ideas??

I am using the OLEDB adapter (Oracle OLEDB) with Oracle 10.2.0.3.0. My code generates the SQL for the query, then when I execute it into an OLEDBDataReader, the HasRows is False. However, if I output the contents of the query string, copy, and paste into SQL+ (logged in as the same user from the same client machine), it returns 993 rows. What gives??

Here’s a segment of my code:

Dim DB As New OleDb.OleDbConnection(String.Format("{0};Password={1}", ConnectionString, DBPassword))
Dim flowQuerySQL As String
'... code to generate query
Debug.Print(flowQuerySQL)
Dim flowQueryCMD As New OleDb.OleDbCommand(flowQuerySQL, DB)
Dim flowQuery As OleDb.OleDbDataReader = flowQueryCMD.ExecuteReader()
While flowQuery.HasRows
    '...handle rows
End While

The debug.print statement shows:

SELECT CLASS_ID, OBJECT_ID FROM TDM_SF_PROCESS WHERE CLASS_ID=853 AND TDM_END_TIME >= '01-Jan-2009' AND TDM_END_TIME < '31-May-2009' AND TDM_STATUS <> 1 AND TDM_STATUS <> 2
  • 1 1 Answer
  • 0 Views
  • 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. Editorial Team
    Editorial Team
    2026-05-26T10:46:20+00:00Added an answer on May 26, 2026 at 10:46 am

    I have just recently started working VB.NET against Oracle, and dates are tempermental.

    This approach has worked for me so far:

    SELECT CLASS_ID, OBJECT_ID 
    FROM TDM_SF_PROCESS 
    WHERE CLASS_ID=853 
      AND TDM_END_TIME >= TO_DATE('01-Jan-2009', 'DD-Mon-YYYY') 
      AND TDM_END_TIME < TO_DATE('31-May-2009', 'DD-Mon-YYYY') 
      AND TDM_STATUS <> 1 
      AND TDM_STATUS <> 2 
    

    It wouldn’t work until I used the “TO_DATE” function. Hopefully this will work for you, too.

    I’m a MS-SQL guy, so I haven’t been able to research the “why” of why this works, yet. Enlightenment, anyone?

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

Sidebar

Related Questions

When trying to enter a SQL query with parameters using the Oracle OLE DB
Any help would be appreciated, I'm trying to convert the code below to C#,
Any help is appreciated. When using cfimage to generate a captcha, we keep his
any help you can give is very gratefully accepted. I've been looking at this
Any help here would be greatly appreciated. I have this table hospital Nurse |
Any help most appreciated, this is driving me insane. I'm doing exactly what I
If it's any help, there is also a similar class in C#'s WebRequest. Although
I would appreciate any help on this issue. Lets say I want to load
Would very much appreciate any help or hint on were to go next. I'm
I can't seem to find any help on this but under the Net tab

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.