Hello.


Im creating an interface like MS Access to create MySQL tables, it is almost done, BUT i have a "small" problem with a string concat, here is the code.

Code:
strSQL = "CREATE TABLE " & txtTableName & " ( "

For dimintRow = 1 To 19
    For dimintCol = 1 To 2
        TempStr = fgMySQLAccess.TextMatrix(dimintRow, dimintCol)
        strSQL = strSQL & " " & TempStr
        DoEvents
    Next dimintCol
    If TempStr <> "" Then
    strSQL = strSQL & " , "
    End If
Next dimintRow
strSQL = strSQL & " )"
txtSQLQuery = strSQL
I need to separate the table fields with a comma (","), but the way im doing it i always get an undesired come at the end of the sql

Code:
CREATE TABLE MyTable (  OneField Text ,  AnotherField Text ,  EvenAnotherField Text ,                                  )

Is there a way to get rid of it?


Thanks in advance!