About CreateDataBase.

About CreateDataBase.

Post by Timoth » Thu, 15 Apr 1999 04:00:00



Can i create a foxpro database using VB ?
Can anyone show me how to do or introduce some web site for me ?
THX
 
 
 

About CreateDataBase.

Post by Timoth » Thu, 15 Apr 1999 04:00:00


The Visdata manager comes with VB can create a foxpro database ?
how to do it ? i read thou. the codes but still don't know how to do.

> Can i create a foxpro database using VB ?
> Can anyone show me how to do or introduce some web site for me ?
> THX


 
 
 

About CreateDataBase.

Post by SITAR » Thu, 15 Apr 1999 04:00:00


if you can possibly afford it, you should pick up a copy of Foxpro. Then you
can easily create a DBF table, and still read it and update it with VB.  Also
visit www.sequiter.com
and look at CODEBASE for VB, which  allows you to create/access DBF Fox tables
from VB, and also Share them with VFP users in a multi user environment...
(although im told that CODEBASE does not intereact with the VFP DBC database
container)... hope this helps
 
 
 

About CreateDataBase.

Post by Ti » Thu, 15 Apr 1999 04:00:00


VisData has a pretty straightforward interface....
File/New/Foxpro/2.0, 2.5,2.6.3.0



>The Visdata manager comes with VB can create a foxpro database ?
>how to do it ? i read thou. the codes but still don't know how to do.


>> Can i create a foxpro database using VB ?
>> Can anyone show me how to do or introduce some web site for me ?
>> THX

 
 
 

About CreateDataBase.

Post by Paul Cleme » Fri, 16 Apr 1999 04:00:00


?Can i create a foxpro database using VB ?
?Can anyone show me how to do or introduce some web site for me ?

Essentially it is almost identically the same as creating an Access
table. You use the Database, TableDef, and Field objects in DAO. First
make certain you've added the Microsoft DAO 3.51 Object library to
your project through the Project...References dialog.

Sub MakeFoxProDB()

Dim wk As Workspace
Dim db As Database
Dim tbl As TableDef
Dim fld As Field

Set wk = Workspaces(0)

'Open the FoxData folder - this folder must already exist
Set db = wk.OpenDatabase("c:\FoxData\", False, False, "FoxPro 3.0")

'Create a FoxPro database (table)
Set tbl = db.CreateTableDef("FoxProDB")

'Add fields to the table definition
Set fld = tbl.CreateField("Field1", dbText, 50)
tbl.Fields.Append fld
Set fld = tbl.CreateField("Field2", dbInteger)
tbl.Fields.Append fld
Set fld = tbl.CreateField("Field3", dbText, 25)
tbl.Fields.Append fld

'Add the FoxPro table def (database file) to "c:\FoxData\" folder
db.TableDefs.Append tbl

db.Close

Set db = Nothing

End Sub

Paul
~~~~

 
 
 

1. Equivalent for DBEngine.CreateDatabase?

In A2K ADP with SQL Server 7.0.  I am converting an MDB to an ADP.  In my
old MDB, I place certain records in a table, create a new A2K MDB, then
export that table into the newly created database.  But my old code bombs
out now.  Is there anything equivalent to the DBEngine.CreateDatabase that I
can use in an ADP?    Old code is as follows:

Dim db As Database, prp As Property
Dim strPath As String
Dim strdbPath As String

strPath = "C:\My Documents"
If Not Len(Dir$(strPath, vbDirectory)) > 0 Then
MkDir strPath
End If

strdbPath = "C:\My Documents\Database Name"

------ Here is where it bombs out:

Set db = DBEngine.CreateDatabase(strdbpath, dbLangGeneral)

--- More code

TIA

Iris

2. WebLynx pre-release notification

3. Problems w/ SQL Server 6.5 createdatabase and dbremove.

4. Tracing sql server user logins

5. MS Jet and ADO.CreateDatabase ?

6. IIUG Alert - 11/2/2001

7. createdatabase method

8. Select Distinct on column while filtering on another

9. Difference between CreateDatabase constant from VB3 to VB4 ?

10. CreateDatabase() in VB3.0 Pro Ed

11. CreateDatabase() in VB3.0 Prof Ed

12. How to use createdatabase make a mdb file for access 2000