Advertisement

[x]
Attachment Details

VBScript; Query DBF FIles

[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.8
Tags: , ,
Hello All,

I will do my best to explain this problem. I am attemping to query 3 dbf files for student information. The School uses a program called SASI. Some of you may be familiar with this. I would like to use vbscript to query the files directly. The information I need is located in 3 different files. Here is how the files are laid out. One File contains the General Student Information (ASTU.DBF). Another file contains the student schedules (ACLS.DBF). The last file ties the class to the teacher (AMST.DBF).

The first file (ASTU.DBF) conatins a STULINK field which ties the student information with the Schedules (ACLS.DBF). The second file (ACLS.DBF) contains a CLASSLINK field which ties this file to the Teacher File(AMST.DBF).

This is the info that I need. Student Name, Address, Phone, located in the first file, and 1st Period Teacher' Name  located in the 3rd File. Here is a snippett of my code, minus all the variable declerations.



DO WHILE NOT (StuRS.EOF)   ' ASTU.DBF
strTest = 01  
    DO WHILE NOT (ClsRS.EOF)  ' ACLS.DBF
        IF StuRS.Fields(StuLink) = ClsRS.Fields(StuLink) Then
              DO WHILE NOT (SchRS.EOF) ' AMST.DBF
                    IF ClsRS.Fields(ClassLink) = SchRS.Fields(ClassLink) Then
                           IF SchRS.Fields(Period) = 01 Then
                                wscript.echo StuFirstName & StuLastName & TchName
                                strTest = 02
                                Exit Do
                           Else
                           End If
                    Else
                    End If
              SchRS.MoveNext
              Loop
        Else
        End If
    IF strTest = 02 Then
        Exit Do
    Else
    End If  


    ClsRS.MoveNext
    Loop

ClsRS.MoveFirst
SchRS.MoveFirst
StuRS.MoveNext
Loop

wscript.quit


I hope by this code you can see what I am trying to accomplish. I am not to concerned with the syntax of the code, but more with the logic and flow. I can actually get some of the information i need back, but I am only getting half of the records.

Thanks in Advance
Related Solutions
Related Solutions
 
Loading Advertisement...
 

Rank: Genius

Expert Comment by RobSampson:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 

Rank: Master

Expert Comment by graye:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Author Comment by defore:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Author Comment by defore:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 

Rank: Genius

Expert Comment by RobSampson:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Author Comment by defore:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 

Rank: Genius

Expert Comment by RobSampson:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Author Comment by defore:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 

Rank: Genius

Accepted Solution by RobSampson:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Author Comment by defore:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 

Rank: Genius

Expert Comment by RobSampson:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
Loading Advertisement...
20080924-EE-VQP-40 / EE_QW_1_20070628