Getting error with table update
Jason,
I am using A2K/ WinXP
I used your SQL and I did not get an error. I changed the field from 50 to
10, then to 55, then to 35..... no errors.
Are you using any special chars in the table name or field name???
Is the column you are trying to alter TEXT??
Try changing your code to:
Dim sSQL as string
' this should be one line
sSQL = "ALTER TABLE [" & vTableName & "] ALTER COLUMN [" & vFieldName &
"] TEXT (" & vParameters & ")"
' find out what is in the string sSQL
Debug.Pring sSQL
db.Execute sSQL, dbFailOnError
Set a breakpoint on the "db.Execute" line and post back with the sSQL
results (from the immediate window)
HTH
--
Steve S
--------------------------------
"Veni, Vidi, Velcro"
(I came; I saw; I stuck around.)
"Jason" wrote:
db.Execute "ALTER TABLE [" & vTableName & "] ALTER COLUMN [" & vFieldName &
"] TEXT (" & vParameters & ")" 'change field size
where vParameters = 10
Gives Run-time error '3293'
Syntax error in ALTER TABLE statement
The field is created with field size =255 but not 10
|