Jump to content
Simio Forum

sparakh

Members
  • Content Count

    11
  • Joined

  • Last visited

Community Reputation

0 Neutral

About sparakh

Converted

  1. I ran into a problem with writing data to a MySQL database table from Simio. The issue was MySQL was complaining about the String representation of a node (Node.Name) that I was trying to write to a VARCHAR() type database column using the DBExecute Step (using native sql in the SQL Statement). The error was something on the lines of "Unknown Column in field list". Found the answer on a mySQL posting. The solution is to surround the String value with a single quote (') character when writing it out to using a DBExecute statement. MySQL thinks it reading a column name instead of an actual value (wierd!). For instance, if I wanted to write the String "ABC" to a VARCHAR column, I should instead write "'ABC'" (adding a single quote on either sides of the String). If I wanted to write the Node name to the VARCHAR column, I should write "'" + Node.Name + "'" I thought this might be helpful and save others valuable time debugging.
×
×
  • Create New...