Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why SQL syntax error in alter table?

Status
Not open for further replies.

Zoon

Technical User
Nov 27, 2002
28
US
I want to make a text field wider in a database that uses jet 3.5, and SQL is the only way that I know of to query this database.

I get '3293 syntax error in alter table statement' when I run this; ALTER TABLE [Product] ALTER COLUMN [Description] TEXT(30). The publisher of the program will not help me modify their commerical product.

What could be wrong or how can I widen this column?
 
I was able to use the alter syntax in my access 2000 mdb through an ADO connection. Give it a try on an ADO connection, you will need to set a reference to the ADO library.

Function testit2()
'-- Microsoft ActiveX data objects 2.6 library needed for ADO

Dim cn As New ADODB.Connection
Dim sql As String

sql = "ALTER TABLE Categorys " & _
"alter Column av_price text(30);"

Set cn = CurrentProject.Connection
cn.Execute sql

End Function
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top