P
Patrice
What if you try VARCHAR(3) instead ?
Andrzej Kaczmarczyk said:Hi,
I have a DBF table that I can access using from VisualStudio 2005 via ODBC
OdbcConnection conn;
string connectionString = @"Dsn=Pliki programu
dBase;defaultdir=c:\DBFFiles;driverid=533;maxbuffersize=2048;pagetimeout=5";
conn = new OdbcConnection(connectionString);
conn.Open();
I can then for example query it with select or import a schema
DataTable dt = conn.GetSchema(OdbcMetaDataCollectionNames.Columns);
The problem is when I try to alter or add the column to the table;
I am following this page (mind the wrap):
http://msdn.microsoft.com/library/d...y/en-us/odbc/htm/vfplngcreate_table___sql.asp
but trying something as simple (the table exists, isn't open by other
program) as
query = "ALTER TABLE testTable ADD COLUMN testColumn C (3)";
OdbcCommand cmd = new OdbcCommand(query, this.conn);
cmd.ExecuteNonQuery();
or
query = "CREATE TABLE testTable (testColumn C (3))";
OdbcCommand cmd = new OdbcCommand(query, this.conn);
cmd.ExecuteNonQuery();
always yields [ERROR][42000 ][Microsoft][ODBC Driver] Invalid field
definition
can anyone tell me what's wrong with those queries?
I've tried quoting, bracketing the column name,putting additional zeros,
using date, and eliminating the field width entirely.
CUIN Kaczy
thx, I'll try it on MondayU¿ytkownik "Cindy Winegarden said:Hi Andrzej,
Have you considered using the FoxPro and Visual FoxPro ODBC driver or OLE
DB data provider