[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

6.4

adodb problem quering dates

Asked by jonasito74 in VB Database Programming

Tags: adlockoptimistic, date, problem, quering, settings

Hi everybody:

I'm developing an application using vb 6.0 and mysql.
To open recordset I use ADO. so to open a query I do:
Dim conn As ADODB.Connection
Set conn = New ADODB.Connection
     
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
     
conn.CursorLocation = adUseClient
conn.ConnectionString = "DSN=MY_DSN;" _
& "OPTION=" & 1 + 2 + 8 + 32 + 2048 + 16384
 
    conn.Open

well when I open a table using:

rs.open "Select * from pacientes_udh where fecha_ingreso>='" & primero_de_mes & "' and fecha_alta<='" _
& ultimo_de_mes,conn,adopenstatic, adlockoptimistic



where fecha_ingreso and fecha_alta are two date fields and
primero_de_mes and ultimo_de_mes are two date variables wich contains right values.

So when I do rs.open I get some records, but the results are not correct. rs contains some data that isn't what I query(some records have fecha_ingreso<primero_de_mes).

So I put and adodc object in my application, and do this:
adodc1.recordsource="Select * from pacientes_udh where fecha_ingreso >='" & primero_de_mes & "' and fecha_alta <='" & ultimo_de_mes & "'"

and the result was right, why????

Perhaps is for the options given in conn.options?

I'll give point to everybody, so all good suggestions will be accepted!!
[+][-]09/11/03 12:24 PM, ID: 9339499Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: VB Database Programming
Tags: adlockoptimistic, date, problem, quering, settings
Sign Up Now!
Solution Provided By: Squeebee
Participating Experts: 4
Solution Grade: B
 
[+][-]09/10/03 11:48 PM, ID: 9334797Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/10/03 11:51 PM, ID: 9334812Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/11/03 12:02 AM, ID: 9334857Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/11/03 12:42 AM, ID: 9335026Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/11/03 12:44 AM, ID: 9335038Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/11/03 06:38 PM, ID: 9341485Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/11/03 07:02 PM, ID: 9341572Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/11/03 07:36 PM, ID: 9341683Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/11/03 08:47 PM, ID: 9341985Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/11/03 09:21 PM, ID: 9342107Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/12/03 05:54 AM, ID: 9345459Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/13/03 11:02 AM, ID: 9353697Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/15/03 07:46 AM, ID: 9363331Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/15/03 07:49 AM, ID: 9363360Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/15/03 08:06 AM, ID: 9363524Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/15/03 08:20 AM, ID: 9363645Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92