|
-
Apr 5th, 2000, 02:55 PM
#1
Thread Starter
New Member
hey great programmers!
Can anyone of you tell me how can I create a new Foxpro or paradox databaes useing VB.
Thanx
-
May 23rd, 2000, 02:33 AM
#2
New Member
> Can anyone of you tell me how can I create a new
> Foxpro or paradox databaes useing VB.
'If you are using DAO, you do it like this:
DIM db as dao.database
DIM rs as dao.recordset
DIM S as String
DIM Tablename as String
' For foxpro, you open a directory as the database
Set DB = Workspaces(0).OpenDatabase("C:\Directory", False, False, "Foxpro 3.0")
TableName = "SOME_TABLE"
S = "CREATE TABLE "&Tablename & _
" (A TEXT(4), B INTEGER )"
DB.EXECUTE S
' Now that the table is open, write records
Set RS = DB.OpenRecordset(TableName & ".DBF")
rs.addnew
RS!A = "ABCD" ' or RS.FIELDS("A")="ABCD"
RS!B = 5 ' or RS.FIELDS("B")=5
rs.update
' More things...
rs.close
db.close
Paul Robinson <A HREF="mailto:[email protected]">[email protected]</A><BR><A href="http://paul.washington.dc.us">paul.washington.dc.us</A>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|