---
title: "Access database datatype problem"  
description: "Access database datatype problem"  
author: "Anonymous User"  
published: 2012-02-21  
updated: 2012-02-21  
canonical: https://www.mindstick.com/forum/385/access-database-datatype-problem  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# Access database datatype problem

I am creating a table in [access database](https://www.mindstick.com/forum/156007/how-to-create-primary-key-in-access-database) using OdbcConnection class as I am using DSN but I was unable to [create table](https://www.mindstick.com/articles/443/how-to-create-table-in-sql-server). An error is generated "[Syntax error](https://www.mindstick.com/forum/159599/what-is-a-syntax-error-in-sql-give-an-example) in field initilizer." I am using c# 3.5.

Query which I had written for creating table is

create table [tblEmployee] ([ID] long [not null](https://www.mindstick.com/interview/1933/what-is-not-null-constraint) , [EmployeeSalary] [decimal](https://www.mindstick.com/forum/34709/please-write-a-program-for-decimal-to-binary-conversion-in-c-sharp) null)

I think [problem](https://yourviews.mindstick.com/view/81399/tackling-the-problem-of-unemployment-during-corona-pandemic) is with decimal [datatype](https://www.mindstick.com/forum/160266/explain-the-datatype-data-annotation-and-its-significance-in-data-entry-and-display) in Odbc [driver](https://yourviews.mindstick.com/view/80820/ola-driver-rude-behavior-with-mindstick-owners) but when I am using OleDbConnection then no problem arises.


---

Original Source: https://www.mindstick.com/forum/385/access-database-datatype-problem

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
