Sql Server; Sql Strings In Export Set


Recommended Posts

There are only 5 strings you need to identify:


1) the one used to create a new table (usually "CREATE TABLE")

2) the one used to add a new record (usually "INSERT INTO")

3) the one used to declare a date / time field (usually "DATE")

4) the one used to declare a real floating number (64 bit float), (usually "DOUBLE" or "REAL")

5) the one used to declare a string (usually "TEXT")


the one that is usually different is #4.  Note that 3-5 are only used if the table doesn't already exist.  If you precreate the table then the only one that matters is #2.  However, if you create the table wrong (i.e. don't create the right fields), or if you change an export set and add new fields, DAQFactory won't log.  What happens is that it first tries to do an INSERT INTO on the database table you provide.  If that fails, it assumes the table doesn't exist and tries to create a new table.  The problem is that if the table does already exist, but just has the wrong fields, then INSERT INTO will fail because the fields don't match up, and then CREATE TABLE will fail because the table already exists.  The end result is no logging.  So, you might try changing #4 to REAL, then deleting the table or writing to a fresh one.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.