I'm sure this is possible, because I have other places that I store lists in an Access database field, but I can't seem to get this to work. Here is my insert:
The first two items insert fine, but I get the following error when I try to insert the value of "TodayIs". As you can see, TodayIs is a list of dates. I performed an IsSimpleValue test on TodayIs, and it returned "Yes", so I'm not sure why this insert doesn't work.
Error Diagnostic Information
ODBC Error Code = 21S01 (Insert value list does not match column list)
[Microsoft][ODBC Microsoft Access Driver] Number of query values and destination fields are not the same.
SQL = "INSERT INTO TimeTable ( TimePersonID, TimeWeekending, TimeTodayIs ) VALUES ( 'DBC2FE2C-AF32-43A8-BE3E57780D3700BC', {ts '2001-08-04 00:00:00'}, {ts '2001-07-30 00:00:00'},{ts '2001-07-31 00:00:00'},{ts '2001-08-01 00:00:00'},{ts '2001-08-02 00:00:00'},{ts '2001-08-03 00:00:00'} )"
Calista :-X
Jedi Knight,
Champion of the Force
Code:
<!--- Insert data into the database. --->
<CFQUERY NAME="InsertData"
DATASOURCE="#Application.Datasource#"
DBTYPE="ODBC">
INSERT INTO TimeTable
(
TimePersonID,
TimeWeekending,
TimeTodayIs
)
VALUES
(
'#Cookie.User.ID#',
#Form.Weekending#,
#TodayIs#
)
</CFQUERY>
Error Diagnostic Information
ODBC Error Code = 21S01 (Insert value list does not match column list)
[Microsoft][ODBC Microsoft Access Driver] Number of query values and destination fields are not the same.
SQL = "INSERT INTO TimeTable ( TimePersonID, TimeWeekending, TimeTodayIs ) VALUES ( 'DBC2FE2C-AF32-43A8-BE3E57780D3700BC', {ts '2001-08-04 00:00:00'}, {ts '2001-07-30 00:00:00'},{ts '2001-07-31 00:00:00'},{ts '2001-08-01 00:00:00'},{ts '2001-08-02 00:00:00'},{ts '2001-08-03 00:00:00'} )"
Calista :-X
Jedi Knight,
Champion of the Force