Cannot create Visual FoxPro table using ADO 
Author Message
 Cannot create Visual FoxPro table using ADO

I am trying to create Visual FoxPro tables using ADO (see the
following code snippet). The code executes without any error. However,
the table is not created. Any idea why?

I tried to use other drivers (e.g. Driver=Microsoft dBase Driver
(*.dbf), Provider=Microsoft.Jet.OLEDB.4.0; etc.). I can create table
using these drivers, but if I try to create an integer column, it is
always converted to Numeric (20, 5), which is unacceptable.

Any solution to the integer column problem?

Thanks in advance for all the help...

<snip>

Dim objConn as ADODB.Connection

Set objConn = New ADODB.Connection
objConn.Open "Driver={Microsoft Visual FoxPro Driver};" _
           & "Source Type=DBF;"  _
           & "SourceDB=C:\Temp;" _
           & "Exclusive=No;"

objConn.Execute "Create Table test (intCol Integer)"
objConn.Close

</snip>



Tue, 01 Feb 2005 05:34:41 GMT  
 Cannot create Visual FoxPro table using ADO
Try following query.

objConn.Execute "Create Table test (intCol N(10))"

Best Regards,

Luqman


Quote:
> I am trying to create Visual FoxPro tables using ADO (see the
> following code snippet). The code executes without any error. However,
> the table is not created. Any idea why?

> I tried to use other drivers (e.g. Driver=Microsoft dBase Driver
> (*.dbf), Provider=Microsoft.Jet.OLEDB.4.0; etc.). I can create table
> using these drivers, but if I try to create an integer column, it is
> always converted to Numeric (20, 5), which is unacceptable.

> Any solution to the integer column problem?

> Thanks in advance for all the help...

> <snip>

> Dim objConn as ADODB.Connection

> Set objConn = New ADODB.Connection
> objConn.Open "Driver={Microsoft Visual FoxPro Driver};" _
>            & "Source Type=DBF;"  _
>            & "SourceDB=C:\Temp;" _
>            & "Exclusive=No;"

> objConn.Execute "Create Table test (intCol Integer)"
> objConn.Close

> </snip>



Wed, 02 Feb 2005 04:30:28 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Cannot add record to Visual Foxpro table after deleting all records in table

2. Using FoxPro 3.0 tables in VB using ADO

3. Unable to update records in Visual FoxPro Table with ADO-ODBC

4. Need help creating Fox 2.5 table via MS Visual FoxPro ODBC driver

5. Creating/Duplicating Foxpro tables with ADO

6. Link FoxPro Table in Access 2000 using ADO

7. SELECT INTO using ADO and Foxpro tables

8. Any native database to use in VB, like DBF foxPro table in Visual Foxpro, with no ado connection and recordet need, like visual foxpro?

9. ADO connection using Foxpro table (DBF) - SQL

10. Cannot bind DataGrid using ADO DataControl to an Acess 2000 table

11. Cannot create a Table using ADOCE

12. access table updated by Visual Basic passed on to visual Foxpro

 

 
Powered by phpBB® Forum Software