General information
Category:
Coding, syntax & commands
Eric,
I bet it worked the first time through for you as it did for me. After that, no-go.
Turns out the default with CREATE TABLE is to add it to a database if one is current. You don't need the DATABASE keyword here.
So, the database is telling you it already has record of that table. If you deleted the table itself you still have mention of it in your dbc.
>I wrote a code that will create a table (whatever its filename is) to my directory "DATA\". The value of my textbox is "mytable.dbf":
>
>cFileName = CURDIR()+"DATA\"+ALLTRIM(Thisform.txtFileName.Value)
>CREATE TABLE &cFileName (Field1 N(2), Field2 C(8))
>
>- OR -
>
>cFileName = CURDIR()+"DATA\"+ALLTRIM(Thisform.txtFileName.Value)
>CREATE TABLE (cFileName) (Field1 N(2), Field2 C(8))
>
>returns an error message "Field name is a duplicate or invalid."
>
>What could possibly be wrong?
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only