I have a situation when i want to insert some selected columns in the database.
Talking about one column, i have the column name and its value stored in two variable say
strcolnames = strcolnames + ", city_name" and
its value stored in a variable , say strcolvalue
now to make my sql i collect all selected parameters through another strparameters variable and i want somethimg like
strparameters = strparameters + '" & strcolvalue & "' and so on
so that final sql looks like
finalsql = "Insert into table_name(" & strcolname " values ( " & strparameters
what i want is that strparameters should store the parameter names with ampersand and quotes signs and get eveluated only at final sql runtime, but what i get now is that they already get evaluated because of & character and i can not see the latest values in the sql - parameters get values later on .. after
strparameters = ..... - statement
i think its a very simple problem somewhere- trying to store the string with & character..
Anyone - please help.
Anshu
Talking about one column, i have the column name and its value stored in two variable say
strcolnames = strcolnames + ", city_name" and
its value stored in a variable , say strcolvalue
now to make my sql i collect all selected parameters through another strparameters variable and i want somethimg like
strparameters = strparameters + '" & strcolvalue & "' and so on
so that final sql looks like
finalsql = "Insert into table_name(" & strcolname " values ( " & strparameters
what i want is that strparameters should store the parameter names with ampersand and quotes signs and get eveluated only at final sql runtime, but what i get now is that they already get evaluated because of & character and i can not see the latest values in the sql - parameters get values later on .. after
strparameters = ..... - statement
i think its a very simple problem somewhere- trying to store the string with & character..
Anyone - please help.
Anshu