General information
Category:
Coding, syntax & commands
Title:
INSERT - SQL and macro/name substitution
I have a button bar class with properties that hold the names of the aliases used for the form and its grid. The method for adding records has some code which uses INSERT - SQL. Since it's a class, the alias names can't be hard-coded, of course. They need to come from the class property, which is filled in the instance of the form. I'm trying various ways to use macro or name substitution, but I can't get the syntax right. My latest attempt goes like this:
cAlias1 = THIS.Parent.Alias1;
+'('+THIS.Parent.FieldName1;
+','+THIS.Parent.FieldName2+')'
INSERT INTO &cAlias1. VALUES(var1,var2)
I also tried INSERT INTO (cAlias1) VALUES(var1,var2) and I still get syntax errors.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only