<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Date/Time Field in Access 2000 - INSERT INTO ... syntax error in LabVIEW</title>
    <link>https://ni.lithium.com/t5/LabVIEW/Date-Time-Field-in-Access-2000-INSERT-INTO-syntax-error/m-p/88240#M54079</link>
    <description>I am using Labview 6.1 Professional with the Database Connectivity Toolkit. When I execute this SQL Command "INSERT INTO PRODUCTION (Part, Passed, Date) VALUES ('Part#1', 2, '10/10/2003 10:10:10 AM')" I get a Run-Time Syntax Error. If I remove the Date Label and Date Value it works. What is the proper Format of the Date/Time Type Field in ACCESS 2000 for Labview 6.1 SQL? I have seen and tried all of the solutions already posted like MSG 1ZNAJHJ6. &lt;BR /&gt;</description>
    <pubDate>Thu, 05 Jun 2003 21:07:33 GMT</pubDate>
    <dc:creator>G.G.K.</dc:creator>
    <dc:date>2003-06-05T21:07:33Z</dc:date>
    <item>
      <title>Date/Time Field in Access 2000 - INSERT INTO ... syntax error</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Date-Time-Field-in-Access-2000-INSERT-INTO-syntax-error/m-p/88240#M54079</link>
      <description>I am using Labview 6.1 Professional with the Database Connectivity Toolkit. When I execute this SQL Command "INSERT INTO PRODUCTION (Part, Passed, Date) VALUES ('Part#1', 2, '10/10/2003 10:10:10 AM')" I get a Run-Time Syntax Error. If I remove the Date Label and Date Value it works. What is the proper Format of the Date/Time Type Field in ACCESS 2000 for Labview 6.1 SQL? I have seen and tried all of the solutions already posted like MSG 1ZNAJHJ6. &lt;BR /&gt;</description>
      <pubDate>Thu, 05 Jun 2003 21:07:33 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Date-Time-Field-in-Access-2000-INSERT-INTO-syntax-error/m-p/88240#M54079</guid>
      <dc:creator>G.G.K.</dc:creator>
      <dc:date>2003-06-05T21:07:33Z</dc:date>
    </item>
    <item>
      <title>Re: Date/Time Field in Access 2000 - INSERT INTO ... syntax error</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Date-Time-Field-in-Access-2000-INSERT-INTO-syntax-error/m-p/88241#M54080</link>
      <description>Well, if it's any consolation handling dates is a pain regardless of which database you use. In any case, I created a table with the following definition:&lt;BR /&gt;&lt;BR /&gt;CREATE TABLE testing&lt;BR /&gt;  (item1 INTEGER,&lt;BR /&gt;   item2 DATE)&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;I them did the following insert:&lt;BR /&gt;&lt;BR /&gt;INSERT INTO testing&lt;BR /&gt;  VALUES (1, '18/11/1953 04:20:00');&lt;BR /&gt;&lt;BR /&gt;And everything worked fine. Note that in the date (my Bday, BTW) the format is DD/MM/YYYY followed by the time.&lt;BR /&gt;&lt;BR /&gt;What exactly is the error you're getting? Can you post the exact text of the error message. Also, I ran my test using the examples that come with LabSQL--not the toolkit.&lt;BR /&gt;&lt;BR /&gt;Mike...&lt;BR /&gt;&lt;BR /&gt;Oops, just noticed something. You have a column name that is probibly a reserved word "Date". Try your insert as:&lt;BR /&gt;&lt;BR /&gt;INSERT INTO PRODUCTION&lt;BR /&gt;  VALUES&lt;BR /&gt; ('Part#1', 2, '10/10/2003 10:10:10 AM')&lt;BR /&gt;&lt;BR /&gt;If there is only those three columns and they the order the data appears is the same as the column order, you don't need the column list. If this works (and it should--I just tried it) I would only view it as a temporary patch. The column name should be changed.&lt;BR /&gt;&lt;BR /&gt;This is also a good reason to not use the Access GUI to create tables. If you tried creating a table like that in SQL you would have gotten an error message. Learning to build tables in SQL code isn't hard and it adds an extra layer of error checking that the GUI apparently doesn't think is important.&lt;BR /&gt;&lt;BR /&gt;If you're interested let me know and I can send you the info on a really good book on SQL... &lt;BR /&gt;</description>
      <pubDate>Fri, 06 Jun 2003 00:09:39 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Date-Time-Field-in-Access-2000-INSERT-INTO-syntax-error/m-p/88241#M54080</guid>
      <dc:creator>mikeporter</dc:creator>
      <dc:date>2003-06-06T00:09:39Z</dc:date>
    </item>
    <item>
      <title>Re: Date/Time Field in Access 2000 - INSERT INTO ... syntax error</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Date-Time-Field-in-Access-2000-INSERT-INTO-syntax-error/m-p/88242#M54081</link>
      <description>Mike,&lt;BR /&gt; Removing the Column Names from the SQL CMD solved the Syntax Error. So, I changed the Column name from "Date" to "DateTime". Now the "INSERT INTO PRODUCTION ( PartNumber, Passed, DateTime ) VALUES ( 'Part#1', 101, '12/31/2003' ) WORKS. And without having to enter a TIME Value, either. Thanks Dude! The Database Tables were actually created in Access 2000 not SQL nor Labview. Yes, I agree, Date &amp;amp; Time fields are weird.&lt;BR /&gt;&lt;BR /&gt; What is that name of the SQL Book? &lt;BR /&gt;&lt;BR /&gt;Greg Klocek &lt;BR /&gt;</description>
      <pubDate>Fri, 06 Jun 2003 00:59:32 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Date-Time-Field-in-Access-2000-INSERT-INTO-syntax-error/m-p/88242#M54081</guid>
      <dc:creator>G.G.K.</dc:creator>
      <dc:date>2003-06-06T00:59:32Z</dc:date>
    </item>
    <item>
      <title>Re: Date/Time Field in Access 2000 - INSERT INTO ... syntax error</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Date-Time-Field-in-Access-2000-INSERT-INTO-syntax-error/m-p/88243#M54082</link>
      <description>Hi Greg!&lt;BR /&gt;&lt;BR /&gt;Remember me? I spent two weeks working for you one week.&lt;BR /&gt;&lt;BR /&gt;Ben &lt;BR /&gt;</description>
      <pubDate>Fri, 06 Jun 2003 12:34:48 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Date-Time-Field-in-Access-2000-INSERT-INTO-syntax-error/m-p/88243#M54082</guid>
      <dc:creator>Ben</dc:creator>
      <dc:date>2003-06-06T12:34:48Z</dc:date>
    </item>
    <item>
      <title>Re: Date/Time Field in Access 2000 - INSERT INTO ... syntax error</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Date-Time-Field-in-Access-2000-INSERT-INTO-syntax-error/m-p/88244#M54083</link>
      <description>Yes, I do. HI! How you doing? I work for Innovar Systems Limited in North Jackson Industrial Park. I do Labview almost exclusively, now.&lt;BR /&gt;&lt;BR /&gt; The DATE/TIME field in ACCESS 2000 is weird when accessing thru Labview Connectivity Toolkit. In SQL UPDATE or SELECT CMD I have to use "WHERE DateTimeField = #YYYY-MM-DD#". Yes, POUND SIGNS! But for the INSERT INTO TABLE CMD I use a Cluster for the Fields with the Labview SLASH Codes "\01date/time\0112/31/2003" String. &lt;BR /&gt;&lt;BR /&gt; In Access 2000 you can Name a Feild "DATE" but you get a Runtime Syntax error in Labview when trying to access the Table wit a Field named "DATE".&lt;BR /&gt;&lt;BR /&gt; Weird indeed. Very Strange format. But it works!&lt;BR /&gt;&lt;BR /&gt;Gregory Klocek &lt;BR /&gt;</description>
      <pubDate>Fri, 06 Jun 2003 13:47:15 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Date-Time-Field-in-Access-2000-INSERT-INTO-syntax-error/m-p/88244#M54083</guid>
      <dc:creator>G.G.K.</dc:creator>
      <dc:date>2003-06-06T13:47:15Z</dc:date>
    </item>
    <item>
      <title>Re: Date/Time Field in Access 2000 - INSERT INTO ... syntax error</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Date-Time-Field-in-Access-2000-INSERT-INTO-syntax-error/m-p/88245#M54084</link>
      <description>DB's sometimes have reserved names. Date is one of them.&lt;BR /&gt;&lt;BR /&gt;Some DB's also do not like spaces in the names. That is why you see names that are "AllRunTogether". Some DB do not allow underscores either.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The last time I looked connectivity toll kit came with a "browser" type thing that let you browse through the DB after you point at it. It also will let you interactively build SQL statements that are correct for your DB. (NO, not all SQL syntaxes are not all the same). I use that utility any time I run into trouble trying to get my SQL statement correct.&lt;BR /&gt;&lt;BR /&gt;Ben &lt;BR /&gt;</description>
      <pubDate>Fri, 06 Jun 2003 14:47:39 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Date-Time-Field-in-Access-2000-INSERT-INTO-syntax-error/m-p/88245#M54084</guid>
      <dc:creator>Ben</dc:creator>
      <dc:date>2003-06-06T14:47:39Z</dc:date>
    </item>
    <item>
      <title>Re: Date/Time Field in Access 2000 - INSERT INTO ... syntax error</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Date-Time-Field-in-Access-2000-INSERT-INTO-syntax-error/m-p/88246#M54085</link>
      <description>Look for:&lt;BR /&gt;&lt;BR /&gt;"The Practical SQL Handbook: Using Structured Query Language", by Judith S. Bowman, Sandra L. Emerson and Marcy Darnovsky.&lt;BR /&gt;&lt;BR /&gt;Also be aware that for some databases "datetime" is also a reserved word--it's in fact a synonym for "date". Safest is to use something a little more specific like "prod_date" or something of that nature. Also be aware that SQL in the language syntax is NOT case-sensitive.&lt;BR /&gt;&lt;BR /&gt;Mike... &lt;BR /&gt;</description>
      <pubDate>Sat, 07 Jun 2003 03:04:28 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Date-Time-Field-in-Access-2000-INSERT-INTO-syntax-error/m-p/88246#M54085</guid>
      <dc:creator>mikeporter</dc:creator>
      <dc:date>2003-06-07T03:04:28Z</dc:date>
    </item>
    <item>
      <title>Re: Date/Time Field in Access 2000 - INSERT INTO ... syntax error</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Date-Time-Field-in-Access-2000-INSERT-INTO-syntax-error/m-p/88247#M54086</link>
      <description>you solved my problem, those pound signs were a killer to debug.&lt;BR /&gt;Thanx, &lt;BR /&gt;keep drawing code&lt;BR /&gt;lmd2 &lt;BR /&gt;</description>
      <pubDate>Thu, 12 Feb 2004 19:53:47 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Date-Time-Field-in-Access-2000-INSERT-INTO-syntax-error/m-p/88247#M54086</guid>
      <dc:creator>lmd2</dc:creator>
      <dc:date>2004-02-12T19:53:47Z</dc:date>
    </item>
    <item>
      <title>Re: Date/Time Field in Access 2000 - INSERT INTO ... syntax error</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Date-Time-Field-in-Access-2000-INSERT-INTO-syntax-error/m-p/424736#M209060</link>
      <description>This is an excellent post. I had the exact same problem today. Trying to create a new table with DB Table Create.vi, and when the table format array would get passed, LabVIEW would return a -20xxxx error, don't remember the exact number. It's because I was trying to pass 2 fields named Date and Time into the table....changed it to Date_ and Time_ and everything works now. Thanks.</description>
      <pubDate>Fri, 06 Oct 2006 17:30:26 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Date-Time-Field-in-Access-2000-INSERT-INTO-syntax-error/m-p/424736#M209060</guid>
      <dc:creator>romulus</dc:creator>
      <dc:date>2006-10-06T17:30:26Z</dc:date>
    </item>
  </channel>
</rss>

