Patric, what is the data type of the startdatum and enddatum fields in the
Access DB Table?

Kind Regards - Mike Brunt, CTO
Webapper
http://www.webapper.com
Downey CA Office
"Webapper - Making the NET work"


-----Original Message-----
From: Patric Stumpe [mailto:[EMAIL PROTECTED]]
Sent: Saturday, April 20, 2002 2:47 PM
To: CF-Talk
Subject: DB problem


Hi fellows,

I'm stumbling about an SQL-error.

I'm just trying to insert some stupid news-ticker-data to an acces-db,
but the following error appears:
--------------------------------
ODBC Error Code = 37000 (Syntax error or access violation)


[Microsoft][ODBC Microsoft Access Driver] Syntaxfehler in der INSERT
INTO-Anweisung.


SQL = "INSERT INTO news (text, startdatum, enddatum, aktiv) VALUES
('test-news', {ts '2002-04-20 00:00:00'}, {ts '2002-05-20 00:00:00'}, 1)"

Data Source = "MAX_FORUM"


The error occurred while processing an element with a general
identifier of (CFQUERY), occupying document position (6:2) to (6:51)
in the template file D:\inetpub\site\_admin\action_news.cfm.
------------------------------

My action looks like this:
--------------------------
 <cfset startdatum = CreateODBCDateTime(CreateDate(#form.startjahr#,
#form.startmonat#, #form.starttag#))>
 <cfset enddatum   = CreateODBCDateTime(CreateDate(#form.endjahr#,
#form.endmonat#, #form.endtag#))>

 <cfquery name="insertNews" datasource="max_forum">
    INSERT INTO     news    (text, startdatum, enddatum, aktiv)
    VALUES                  ('#HTMLEditFormat(form.text)#', #startdatum#,
#enddatum#, #form.aktiv#)
 </cfquery>
-----------------------------


The db-fields are defined as these:

TABLE news
      id (Auto)
      text (MEMO)
      startdatum (DateTime)
      enddatum (DateTime)
      aktiv (BIT)


Any ideas????


--
best regards

Patric Stumpe                          mailto:[EMAIL PROTECTED]


______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to