Hallo ladies and gentlemen
I am strugling with what I think should be a easy solution but can't find it
Basically I am creating a table through SQL and there is a problem with the SQL when I run it. Here is my code:
OleDbCommand cmd = new OleDbCommand
(@"CREATE TABLE " + ClientID + "
(Transaction_ID INT PRIMARY KEY NOT NULL,
Transaction CHAR(255),
Date DATE,
Transaction_Amount INT,
Balance INT,
Deposited INT,
Withdrew INT,
Loan INT,
Applied INT,
Approved INT,
Payment_Monthly INT,
Monthly_Income INT)", mydb);
Now I tested my SQL statement to found out which part of my SQL gives the error and I have found when I remove the fieldsTransaction and Date it works. If I remove only one of them it still crashes. I even tried to change data types like CHAR(255) to VARCHAR(255) also DATE to INT.
To be honest I can't seem to find the problem. Please help
Thank you for your time.
PS: ClientID is a combination of three numbers and three letters with a hashtag for example. 123#ABC