KaiserBreath
Senior Member
- Joined
- Feb 22, 2005
- Messages
- 797
- Reaction score
- 45
Dear all, I am trying to copy some columns from an old table into a new table and adding need columns at the same time. Due to the design of my application, the column order is important.
This is the code:
However, it returns an exception saying:
"No value given for one or more required parameters."
If I run the query from MSAccess itself, it will pop out "Enter Parameter Value" Dialog box for Date, BIT and Text.
I tried various ways in setting parameters for the ADODB.Command, Eg:
However, it still returns that exception.
Is there any way to solve this? I just need the new columns initialize to all null values.
The more direct question is how to use "INSERT INTO" with adding new columns in MS Access.
Thanks alot!
This is the code:
Code:
SELECT oldTable.[ID], Date AS [MyDate], BIT AS [MyBIt], Text AS [MyText] INTO newTable
FROM oldTable;
However, it returns an exception saying:
"No value given for one or more required parameters."
If I run the query from MSAccess itself, it will pop out "Enter Parameter Value" Dialog box for Date, BIT and Text.
I tried various ways in setting parameters for the ADODB.Command, Eg:
Code:
.CreateParameter(, DataTypeEnum.adDate, ParameterDirectionEnum.adParamInput, , vbNull)
Code:
.CreateParameter(, DataTypeEnum.adBoolean, ParameterDirectionEnum.adParamInput, , vbNull)
Code:
.CreateParameter(, DataTypeEnum.adVarWChar, ParameterDirectionEnum.adParamInput, , vbNull)
However, it still returns that exception.
Is there any way to solve this? I just need the new columns initialize to all null values.
The more direct question is how to use "INSERT INTO" with adding new columns in MS Access.
Thanks alot!
Last edited: