I'm trying to create a table in an Access database through an OleDbCommand in VB.Net with the following SQL:
CREATE TABLE InTemp (Month DATE, Description TEXT(255), Cost DOUBLE, Patron TEXT(255));
The code works fine in Access, but running it in VB.Net returns the OleDbException "Syntax error in field definition".
Full VB code:
Dim con As New OleDb.OleDbConnection
con.ConnectionString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source = " + DatabaseLocale
con.Open()
Dim createInTemp As New OleDb.OleDbCommand("CREATE TABLE InTemp (Month DATE, Description TEXT(255), Cost DOUBLE, Patron TEXT(255));", con)
createInTemp.ExecuteNonQuery()
I know there's no problem with the connection as it works elsewhere in my program.
Any help gladly appreciated!