
dbVersion20 does not accept dbText?
Could anyone help me resolve this 'simple issue:
This is a piece of code to create a database that
uses the Microsoft Jet database engine version 3.0 file format
everything works fine util...
I change 'dbVersion30' to 'dbVersion20'
then it reports Run-time error '3649'
"The language-specific code page was not specified or could not be found"
What does that mean?
That happens when I run this code within VB, but when I run
the same code within Access module with 'dbVersion20' it works fine!
Also if change dbText into say, dbLong within VB while creating field
(see below) along with dbVersion20 it also work fine even in VB.
But it would not let me to use dbVersion20 and dbText within VB
and that is what I need.
Anyone can help me?
Private Sub Command1_Click()
Dim wrkDefault As Workspace
Dim dbsNew As Database
Dim tdfNew As TableDef
Dim rstRecordset As Recordset
' Get default Workspace.
Set wrkDefault = DBEngine.Workspaces(0)
' Create a new database
Set dbsNew = wrkDefault.CreateDatabase("Imitation.mdb", dbLangGeneral,
dbVersion30)
'Add new table
With dbsNew
Set tdfNew = .CreateTableDef("PROJECT")
With tdfNew
.Fields.Append .CreateField("ProductID", dbText)
End With
.TableDefs.Append tdfNew
End With
dbsNew.Close
End Sub