Need help to create table in access mdb

vb6 , access , winxp India
  • 12 years ago
    Hi all, I am using the following code to create a table in Microsoft Access (.mdb) : Conn.Execute "CREATE TABLE Sale_010309 (SALE_ID Char(8), Sale_AMT Long)" In this code, I need to create a field of type boolean. But if I use the following code, the system does not accept it. Conn.Execute "CREATE TABLE Sale_010309 (SALE_ID Char(8), Sale_AMT Long, Sale_Paid Boolean)" Please let me know the actual code to create a logical field in the table using above code. It is urgent please.
  • 11 years ago
    Boolean is not a valid datatype in MSAccess you have to use yesno instead as follows. conn.execute "CREATE TABLE Sale010309 (SALEID Char(8), SaleAMT Long, SalePaid yesno)"

Post a reply

Enter your message below

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Better train people and risk they leave – than do nothing and risk they stay.” - Anonymous