473,406 Members | 2,390 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

FOXPRO 2.5 Table Created From VB6 - Not a Database File Error

Hi experts, I've tried using DAO and ADOX to create dbase tables from VB6. The problem with these is that I can't manipulate the width and decimal places of the fields with a numeric data type. I guess, this is because "Jet DB engine that VB uses tends to translate field types and sizes into what it 'thinks' are correct for a field", as stated from a post.

So I'm trying to create tables directly in Foxpro 2.5 from VB6 using the codes below:

Expand|Select|Wrap|Line Numbers
  1. Global fx As New FoxApplication
  2.  
  3. Set fx = Nothing
  4.  
  5. fx.OleRequestPendingTimeout = 900000
  6. fx.OleServerBusyTimeout = 900000
  7.  
  8. fx.DefaultFilePath = LPath
  9.  
  10. fx.DoCmd "CLOSE DATABASES"
  11. fx.DoCmd "USE customer.dbf"
  12. fx.DoCmd "COPY STRUCTURE TO TEST"
  13. fx.DoCmd ("USE")
  14.  
also this,

Expand|Select|Wrap|Line Numbers
  1. fx.DoCmd ("CREATE TABLE TEST.dbf (FNAME C(12))")
  2.  
The program runs w/o errors, and I can also see from the files that the table TEST.dbf is created. But I can't open it in Foxpro. The error says, "Not a Database file".

I have also tried using the SQL statement:

Expand|Select|Wrap|Line Numbers
  1. rs.open "CREATE TABLE TEST (col1 char(6), col2 int(2))", conn, adOpenStatic, adLockOptimistic, adCmdText
which displays the same error from Foxpro 2.5.

I've also searched from the net about this error and had found some codes that checks and repairs the no. of records in the header. Still, to no avail. If you want to see the codes I found, I'll post it here. It's kinda long.

Please, if anyone has some ideas about this, kindly share it to me.. Please shed some light..

Or if there are other solutions on how to create dbase III tables from vb6 (where I can manipulate the width and decimal places of the numeric fields), please post it here.. Thank you all in advance!
Feb 22 '11 #1
0 890

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Nascimento, Daniel | last post by:
i tried to create a conecction to a database MSAccess 2002 with Microsoft JET 4.0 OLE Provider but it gives me the error: 'Teste connection failed because of an error in initializating provider....
0
by: alex9128 | last post by:
Hi All, Getting error message: "The following unexpected error has occurred: There were errors dropping "acctrecv" onto the designer. The XML Schema could not be interpreted from this object."...
2
by: jaYPee | last post by:
i have split my database and created a code that will look up for the location of the mdb back end everytime the front end link has change. i'm wondering if there is a way to just create and INI...
3
by: Amar | last post by:
I have a abc.PRG file in visual foxpro 8.0. I can run this file using visual foxpro environment and it creates a table X.dbf in the same folder where this program file is and populates some data...
2
by: John | last post by:
can somebody tell me what's wrong wth this code ? IF Request.QueryString("YEAR") <"" THEN SELECT * FROM tblMatches ORDER BY Year DESC, END IF I'm getting an error message: "Server error:...
2
by: cj | last post by:
We have a legacy accounting system (not developed in house) here that happens to be written in Visual FoxPro. One of the tables has an index that is actually a coded function COMPANY1 ...
5
harshadd
by: harshadd | last post by:
can some one explain me, how to update foxpro table (.dbf file) using clien side coading in DHTML or ay client side code like java?
3
by: Kunal Desale | last post by:
Hi, How to insert/update data in foxpro table field having datatype MEMO using Linked Server? I have written sql insert queries in which i have used linked server to insert data into foxpro...
9
by: santhanalakshmi | last post by:
Hi, I am trying to open database file(.mdf) using enterprise manager. Right Click on Databases -> All Tasks -> Attach database I am browsing the .mdf...
3
sickenhoofer
by: sickenhoofer | last post by:
There is no error name, but reads as follows: "Microsoft Office Access has detected that this database is in an inconsistent state, and will attempt to recover the database. During this process, a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.