S sultan87 Active Member Licensed User Longtime User Oct 22, 2011 #1 good evening here an example Curseur = SQL.ExecQuery("SELECT * FROM Relevés") NumberOfColumns = curseur.ColumnCount Dim ColumnName(NumberOfColumns) As String ' names of the columns For i = 0 To curseur.ColumnCount - 1 ColumnName(i) =curseur.GetColumnName(i) Next I would like to put Dim ColumnName in Sub Global so that I can m' in being useful in d' other Sub Best Regards
good evening here an example Curseur = SQL.ExecQuery("SELECT * FROM Relevés") NumberOfColumns = curseur.ColumnCount Dim ColumnName(NumberOfColumns) As String ' names of the columns For i = 0 To curseur.ColumnCount - 1 ColumnName(i) =curseur.GetColumnName(i) Next I would like to put Dim ColumnName in Sub Global so that I can m' in being useful in d' other Sub Best Regards
NeoTechni Well-Known Member Licensed User Longtime User Oct 23, 2011 #2 Curseur = SQL.ExecQuery("SELECT * FROM Relevés") Dim ColumnName as list ' names of the columns For i = 0 To curseur.ColumnCount - 1 ColumnName.add(curseur.GetColumnName(i)) Next ColumnName.size would be the number of columns To get a column name from ColumnName, use ColumnName.get(i) Lists are better in most ways than redimming an array. Upvote 0
Curseur = SQL.ExecQuery("SELECT * FROM Relevés") Dim ColumnName as list ' names of the columns For i = 0 To curseur.ColumnCount - 1 ColumnName.add(curseur.GetColumnName(i)) Next ColumnName.size would be the number of columns To get a column name from ColumnName, use ColumnName.get(i) Lists are better in most ways than redimming an array.
S sultan87 Active Member Licensed User Longtime User Oct 23, 2011 #3 Good evening thank you very much, that functions perfectly Best Regards Upvote 0
NeoTechni Well-Known Member Licensed User Longtime User Oct 24, 2011 #4 sultan87 said: Good evening thank you very much, that functions perfectly Best Regards Click to expand... You're welcome Upvote 0
sultan87 said: Good evening thank you very much, that functions perfectly Best Regards Click to expand... You're welcome