Skip to main content

Access conversion NOTE1: default DateSerial in VBA/Access to SQL

I have started slowly converting my Access database to SQL. The reason is that I would like to take the application online.

After trying to use Access's (version 2007) transfer tool, which did not work that well. I found Microsoft's SQL Migration Assistant 2008 for Access, nicknamed SSMA. Which you can download here.

When you install there is a niggle about the license, which you need to download into their specified directory and it must be the name they provide.

So about the create table. My one table would not convert and I could not see why. After looking at the SQL command I saw the problem was the use of DateSerial. I googled a few sites and could not find an answer

The CREATE TABLE line was:


[RequireUntilDate] datetime2(0) DEFAULT DateSerial(1980,1,1) NOT NULL,



I clicked on the whole command and copied it and then in SQL Server Management Studio, I tried to create the table and found that if I specified the date in US date format it worked:

[RequireUntilDate] datetime2(0) DEFAULT '1980-01-01'  NOT NULL,

I created the table a migrated the data, and it worked like a charm.

Now I have to sort out all the other errors ;)

Comments

Popular posts from this blog

April 7 March – Reflection

The Reality I was unsure if people care enough to make an effort. I planned to join the April 7 March to Save South Africa from the Cape Town Town Hall to Parliament the next day. Arriving in town we could see things were different. We walked past the Market in St Georges mall and saw almost no one there.  As we carried on walking towards the Grand Parade we heard first the motorbikes, then the people. Even though it was not yet noon, the crowd that had gathered was substantial, a lot more than the legal limit of 8,000. I looked up the street and then realized that the crowd was very large, my insecurity that no one cared enough to make an effort seemed like a joke. After some politically charged messages we started a slow march towards Parliament via Buitenkant. It was a slow march with some politically charged chanting – but was peaceful. When we got close to parliament as we could I realized there were a lot of people there.  Pers...

Balance

Category: Ponderous When ever you talk to "life coaches" they talk about balance. What is balance, well it is there way of saying spend more time on personal things. That is not balance that is spending more time on personal things. Balance is what people tell you to get, when you are spending too much time trying to ensure that each day when the bills come you do not have a panic attack. So let's say you decide to take some personal time – get more balance in your life. Your read the secret you have the vision you write the goals, you project your positive thinking, and you believe in attaining the goals you have set. The question is what then. Balance implies there is a fulcrum and, and to much of any time on the one side of the fulcrum, is going to tip in other way, surely believing in balance is in itself a limiting belief. What you need to strive for is a pie chart of your time spent the way that is most beneficial to you as a person. The real limit we have is time (...

Bitcoin / Cryptocurrency – what is it and how can I benefit

What is it I started investigating Bitcoin when it was worth just over $1000 a bitcoin. I was interested in what it was and how it worked. A lot of people are saying we missed the boat, but I believe that everyone should at least try put a little money in now, or at least use a faucet (see below) to make a little micro-currency. You can read a Wiki article about bitcoin and its history etc. But what you need to know is that it is a currency, that is independent of country. No one really knows who invented the concept of a cryptocurrency since the person who published the paper used a nom de plume. All new cryptocurrencies work more or less the same way as Bitcoin. So as I explain below I interchange these terms. Bitcoin is the original cryptocurrency. How Bitcoin works The currency releases a coin based on a mathematical formula. There will never be more than 21 million bitcoins (other cryptocurrencies do not work like this). Each bitcoin can have divided into one hundred mil...