CommandText problem

micro

Well-Known Member
Licensed User
Longtime User
Hi,
why this CommandText:
Text="create table if not exists NameTable (Nome text, Cognome text)"
work fine and this:
.....
Dim Type(colonna1, colonna2) archivio1col
.....
main.archivio1col.colonna1 = "Nome"
main.archivio1col.colonna2 = "Cognome"
.....
Text="create table if not exists NameTable (main.archivio1col.colonna1 text, main.archivio1col.colonna2 text)"

not work?

Tanks
 

micro

Well-Known Member
Licensed User
Longtime User
Try
Text="create table if not exists NameTable (" & main.archivio1col.colonna1 & " text, " & main.archivio1col.colonna2 & " text)"

Perfect, now it work fine. :icon_clap:

Best regards
 
Top