当我收到此错误“字段定义中的语法错误”时,我正在尝试创建一个 DBF 表。,但是语法没有问题,当我将某个列名从级别更改为级别时,它调试就好了!有人有想法吗?这是代码:
string connectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source= D://Temp;Extended Properties=dBase IV";
//MessageBox.Show(connectionString);
OleDbConnection connection = new OleDbConnection(connectionString);
connection.Open();
/* -------------------------- Filling The DBF Files ------------------------*/
using (OleDbCommand cmd = connection.CreateCommand())
{
cmd.CommandText = @"CREATE TABLE clients(
nbrclient int ,
level varchar(1) ,
type varchar(10) ,
name varchar(80) ,
name2 varchar(80) ,
fname varchar(50) ,
vip varchar(40) ,
langue varchar(3) ,
salutations varchar(30) ,
gender varchar(30) ,
title varchar(30)
) ";
cmd.ExecuteNonQuery();
}