
04-04-2008, 11:22 PM
|
|
Freshman
|
|
Join Date: May 2007
Posts: 42
|
|
syntax error in field definition...
|
hi,
this is the code
I tried to create table from vb at runtime, im MS access
Code:
stat = "CREATE TABLE details ( CPFA/CNo text(10), Name text(10), Designation text(10) , Basic currency, Dearness_Pay currency, Dearness_Allowance currency, HRA currency, Special_Allowance currency, Other(E) currency, Total currency, Income_Tax currency, Professional_Tax currency, CPF/EPF currency, BIS/LWP currency, Other(D) currency, Total_Deduction currency, Net_Payable currency);"
stat1 = "CREATE TABLE temp ( CPFA/CNo text(10), Name text(10), Designation text(10), Basic currency, Dearness_Pay currency, Dearness_Allowance currency, HRA currency, Special_Allowance currency, Other(E) currency, Total currency, Income_Tax currency, Professional_Tax currency, CPF/EPF currency, BIS/LWP currency, Other(D) currency, Total_Deduction currency, Net_Payable currency);"
conn.Execute stat
conn.Execute stat1
EDIT : I got my mistake ..i used parentheses and "/" in some field names 
|
Last edited by anuj; 04-04-2008 at 11:45 PM.
|