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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using mediumtext and longtext

Status
Not open for further replies.

nemi1983

Programmer
Feb 23, 2011
5
DE
Dear all,

I have encounter a problem of having text fields longer than 255 characters (impossible to create a table using design view, because the only provided option is TEXT(255)). Thus, I have decided to create my table trough a module using a SQL statement:

Code:
DoCmd.RunSQL "CREATE TABLE  tblImport ([Check_name] text(150), " & _
                 "[Series_name] text(50), " & _
                 "[Reference_date] text(5) , " & _
                 "[Comments] text(255), " & _
                 "[Check Source] text(255), " & _
                 "[Country03] text(20), " & _
                 "[balance05] text(20) , " & _
                 "[maturity06] text(20), " & _
                 "[codelist07] text(20) , " & _
                 "[amount08] text(20), " & _
                 "[counter09] text(20) )"

This statement works fine. In order to enhance my table and have a text field longer than 255 characters I refer to the SQL manual. The options they provide are:
1. mediumtext
2. longtext

When I run the statement with this properties, compiler gives me an error on the SQL statement.

My question:
- within Access, are there limitations about freely using SQL statements in manipulating databases and tables?

Help would be really appreciated.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top