Source language: Translate to:

Create Table Error

Questions about our Advanced Database plug-in

Moderator: Neosoft Support

Postby Gaev » Fri Sep 28, 2007 3:53 pm

something:

What you posted is not complete ... NeoBook can not open it (not a valid pub file) ... and I can't see any code related to the Tables.

Perhaps you can just post the code that is associated with the Button(s).
User avatar
Gaev
 
Posts: 3718
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby Gaev » Sat Sep 29, 2007 6:38 am

something:

You are using a Reserved Word for your Table's name ... I tried your code with a different name ... and it worked ... try this code ...
Code: Select all
FileExists "[PubDir]sample.mdb" "[FileExistsStatus]"
If "[FileExistsStatus]" "=" "True"
    FileErase "[PubDir]sample.mdb"
EndIf

dbpCreateAccessDatabase "[PubDir]sample.mdb" "Password=;Encrypted=No"

dbpOpenAccessDatabase "sample" "[PubDir]sample.mdb" ""
AlertBox "After Open" "status=[sample.$Status]"

dbpCreateTable "sample" "somethingUser" "Company String(35)"

dbpTableExists "sample" "somethingUser" "[Result]"
If "[Result]" "=" "True"
  AlertBox "somethingUser" "Exists"
Else
  AlertBox "somethingUser" "Does NOT Exist"
EndIf


Once you verify that it works on your machine, you can remove the extraneous commands that are there just for verification of results.

Here is (an unofficial) list of Reserved Words ... http://developer.mimer.com/validator/sq ... -words.tml ... try and avoid using them for your database, table and field names.
User avatar
Gaev
 
Posts: 3718
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada


Return to NeoBookDBPro

Who is online

Users browsing this forum: No registered users and 3 guests