Creating *.dbf from VB

Can visual basic create *.dbf databases? If yes how?
Who is Participating?
TimCotteeHead of Software ServicesCommented:
   Dim cnnVFP As New Connection
    Dim rsVFP As New Recordset
    cnnVFP.ConnectionString = "Driver={Microsoft Visual FoxPro Driver};UID=;SourceDB=u:\;SourceType=DBF;Exclusive=No;BackgroundFetch=Yes;Collate=Machine;Null=Yes;Deleted=Yes;"
    rsVFP.Open "CREATE TABLE u:\testtabl (Field1 C(10),Field2 N(3),Field3 N(6,2))", cnnVFP, adOpenStatic, adLockPessimistic

This should get you started, it uses the Visual Foxpro ODBC Driver with the standard foxpro syntax to create a dbf file.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.