Search code examples
guptateamdeveloper

"Grid" table in an insert statement in SQL Windows


How to identify a "Grid column" in an insert statement as they are dynamically created I'm not able to refere these. When I try to add columns in the grid they appare with the correct title, but still not able to refere in an INSERT. The "Grid" is loaded from an .xls.

Thanks


Solution

  • You can refer with hashtag with column index: tblData#1, tblData#2, tblData#3, tblData#4, ...etc.

    Where "tblData" is Child Table Name and #1, #2,... are column indexes.

    Example:

    Call SqlPrepareAndExecute( hSql, 'insert into TABLE(id, name) values(:tblData#1, :tblData#2)' )