Geof
July 10th, 2003, 04:01 PM
I have a VC apllication who write a table in Access 2000 database. I use a SQL string to create my table but when it execute my string it return me a error.
My table
Numero --> integer ( 4 )
Pos -- > char (1)
Hauteur --> double (2,1)
DD --> double (2,1)
code creating the database :
AfxGetModuleState()->m_dwVersion = 0x0601;
CDaoDatabase db;
CDaoRecordset recset(&db);
db.Create ( PathBD, dbLangGeneral, 0x40 );
My SQL string to create table:
CString SqlCmd = "CREATE TABLE TableDD ( Numero number(4), Pos char(1), Hauteur decimal(2,1), DD decimal(2,1) )";
It call me a syntaxe error
if I use the same string with only char type, I don't have any error
CString SqlCmd = "CREATE TABLE TableDD ( Numero char(4), Position char(1), Hauteur char(3), DD char(3) )";
thanks
My table
Numero --> integer ( 4 )
Pos -- > char (1)
Hauteur --> double (2,1)
DD --> double (2,1)
code creating the database :
AfxGetModuleState()->m_dwVersion = 0x0601;
CDaoDatabase db;
CDaoRecordset recset(&db);
db.Create ( PathBD, dbLangGeneral, 0x40 );
My SQL string to create table:
CString SqlCmd = "CREATE TABLE TableDD ( Numero number(4), Pos char(1), Hauteur decimal(2,1), DD decimal(2,1) )";
It call me a syntaxe error
if I use the same string with only char type, I don't have any error
CString SqlCmd = "CREATE TABLE TableDD ( Numero char(4), Position char(1), Hauteur char(3), DD char(3) )";
thanks