Create Table makes memo field instead of text

keb1965

Well-known member
Joined
Feb 9, 2009
Messages
103
Programming Experience
10+
I have tried what I know and I can't seem to get this right.

I'm using a Jet4.0 connection and VB.Net front end

I have been using the following code to create a table, but it has always made a memo field, I read about how to change it to a text field but it fails with an invalid SQL syntax error

This works, but creates a memo field
VB.NET:
sql = "create table " & TableName & " (ID INT Identity(1,1), Project_Name Text, Create_Date DateTime)"

This fails with in invalid SQL syntax error
VB.NET:
sql = "create table " & TableName & " (ID INT Identity(1,1), Project_Name Text(64), Create_Date DateTime)"

Am I crazy or is text(nn) no longer the proper method to set a text field size
 
Ok, false alarm ... wouldn't you know it ... errant character in the SQL command string ... I guess sometimes you need to look a little closer at how those fat fingers can cause problems. I put the string in above and it worked fine. Fields are created properly and all is right with the world, at least for this issue. Thanks for reassuring me that I am not crazy ;)
 
Back
Top