Solved

Too Many Fields defined.  How to load a dbf file with more than 255 fields? Visual Basic 6 pro, vb6

Posted on 2010-11-27
2
805 Views
Last Modified: 2012-05-10
I am using this line to open a dbf file:

Dim db As Database
Dim rs As Recordset
Set db = OpenDatabase("Z:\aloha\vb\dbf\", True, False, "dBASE IV;")
Set rs = db.OpenRecordset("Select * From ITM.DBF Order By ID")

Do While Not rs.EOF
rs.Fields("SHORTNAME")

ETC....ETC....ETC...

The code works great if the database has 255 or less Fields.  How can I load a dbf file that has more than 255 fields.  

I am using VB6pro

Thanks in advanced.
0
Comment
Question by:daneburr
2 Comments
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 500 total points
Comment Utility
Does it work if you list the only some of fields in the Select?

e.g. "Select Field1, Field2  From ITM.DBF Order By ID"


Have you tried ADO instead of DAO?

0
 

Author Closing Comment

by:daneburr
Comment Utility
It worked.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Has anyone used domo? 1 36
null value 14 57
Currency Conversion? 1 34
How to make an ADE file by code? 11 34
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

763 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now