Discussion:
Create VFP Database programmatically
(too old to reply)
Amalraj
2003-09-15 13:10:45 UTC
Permalink
Can anyone let me know how to create a visual foxpro
database (*.dbc) programmatically. Is there any API call
available?

For creating Ms-Access databases I've used
SQLConfigDatasource API. Wanted to know if there is
anything similar to that for VFP.
Eric den Doop
2003-09-15 13:23:11 UTC
Permalink
Hello, Amalraj!
You wrote on Mon, 15 Sep 2003 06:10:45 -0700:

A> Can anyone let me know how to create a visual foxpro
A> database (*.dbc) programmatically. Is there any API call
A> available?

A> For creating Ms-Access databases I've used
A> SQLConfigDatasource API. Wanted to know if there is
A> anything similar to that for VFP.

Native VFP commands are:
CREATE DATABASE
CREATE TABLE
CREATE SQL VIEW
CREATE TRIGGER
See VFP help for details.
--
Eric den Doop
www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP8
EFGroup
2003-09-15 15:17:42 UTC
Permalink
Woo Hoo -
grab an existing dbc - run the gendbc program against it .
Mondo regards [Bill]
--
William Sanders / Electronic Filing Group Remove the DOT BOB to reply via
email.
FREE LONG DISTANCE -> mailto:excel-***@efgroup.net
mySql / VFP / MS-SQL
Post by Amalraj
Can anyone let me know how to create a visual foxpro
database (*.dbc) programmatically. Is there any API call
available?
For creating Ms-Access databases I've used
SQLConfigDatasource API. Wanted to know if there is
anything similar to that for VFP.
Lee Mitchell
2003-09-15 17:26:37 UTC
Permalink
Hi Amalraj:

You don't need to use an API function to create a database. Simply use the
CREATE DATABASE command native to Visual FoxPro.

Are you trying to create this database using the VFP ODBC driver or from
the Visual FoxPro Command window?

I hope this helps.

This posting is provided "AS IS" with no warranties, and confers no rights.

Sincerely,
Microsoft FoxPro Technical Support
Lee Mitchell

*-- VFP8 HAS ARRIVED!! --*
Read about all the new features of VFP8 here:
http://www.universalthread.com/VisualFoxPro/News/VFP8Release.asp
Purchase VFP8 here:
http://shop.microsoft.com/Referral/Productinfo.asp?siteID=11518

Keep an eye on the product lifecycle for Visual FoxPro here:
http://support.microsoft.com/default.aspx?id=fh;[ln];lifeprodv
- VFP5 Mainstream Support retires June 30th, 2003
- VFP6 Mainstream Support retires Sept. 30th, 2003
Post by Amalraj
Can anyone let me know how to create a visual foxpro
database (*.dbc) programmatically. Is there any API call
available?
For creating Ms-Access databases I've used
SQLConfigDatasource API. Wanted to know if there is
anything similar to that for VFP.
Øyvin Hanssen
2003-09-16 09:25:14 UTC
Permalink
* Create the db
CREATE DATABASE datadb\mydata
FLUSH

* Adds a table
CREATE TABLE datadb\sylinder(fieldno1 N(12,0), fieldno1 C(50), fieldno1 I,
fieldno1 D)
FLUSH

* Notes:
* Using FLUSH to prevent from data loss in case of i.e. powerbreaks on
customers PC.
* Short for datatypes: N,C,I,D = Numeric, Char, Integer, Date


Best regards Øyvin Hanssen
Post by Amalraj
Can anyone let me know how to create a visual foxpro
database (*.dbc) programmatically. Is there any API call
available?
For creating Ms-Access databases I've used
SQLConfigDatasource API. Wanted to know if there is
anything similar to that for VFP.
Loading...