Source language: Translate to:

Variable dbase

Questions about our Advanced Database plug-in

Moderator: Neosoft Support

Variable dbase

Postby Frederik Gerritsen » Fri Jul 18, 2008 11:21 am

I Have made a microsoft access database with Neobook

sample :
FileExists "[PubDir]TestArch.mdb" "[TestArchWaar]"

If "[TestArchWaar]" "=" "False"
dbpCreateAccessDatabase "[PubDir]TestArch.mdb" "Password=;Encrypted=No"
dbpOpenAccessDatabase "TestArch" "[PubDir]TestArch.mdb" ""
Else
dbpOpenAccessDatabase "TestArch" "[PubDir]TestArch.mdb" ""
EndIf

dbpTableExists "TestArch" "Data" "[DataisWaar]"

If "[DataisWaar]" "=" "False"
dbpCreateTable "TestArch" "Data" "Name String(35);Number Integer"
dbpOpenTable "TestArch" "Data" ""
Else
dbpOpenTable "TestArch" "Data" ""
EndIf

dbpTableExists "TestArch" "BlobNummer" "[TellerIsWaar]"

If "[TellerIsWaar]" "=" "False"
dbpCreateTable "TestArch" "BlobNumber" "Number Char(3)"
dbpOpenTable "TestArch" "BlobNumber" ""
SetVar "[TestArch.BlobNummer.Number]" "0"
Else
dbpOpenTable "TestArch" "BlobNumber" ""
Endif

dbpTableExists "TestArch" "Blob1" "[Blob1Waar]"

If "[Blob1Waar]" "=" "True"
dbpOpenTable "TestArch" "Blob[TestArch.BlobNumber.Number]" ""
Else
If "[TestArch.BlobNummer.Number]" "=" "0"
SetVar "[TestArch.BlobNummer.Number]" "1"
dbpCreateTable "TestArch" "Blob[TestArch.BlobNummer.Nummer]" "Number AutoInc;Document Picture;kul String(3)"
dbpOpenTable "TestArch" "Blob[TestArch.BlobNumber.Number]" ""
EndIf


dbpShowErrors "No"

so far everything does work. only the blob table doesn't work, it seems i do something wrong with the variable blob table. But i don't know why it doesn't work and now is my question is how can i get it to work.... ?


Regards
Fred
Frederik Gerritsen
 
Posts: 57
Joined: Tue Apr 11, 2006 3:33 am
Location: Netherlands

Postby Gaev » Fri Jul 18, 2008 12:36 pm

Fred:

a) You have used BlobNummer in some places and BlobNumber in other places

dbpTableExists "TestArch" "BlobNummer" "[TellerIsWaar]"

If "[TellerIsWaar]" "=" "False"
dbpCreateTable "TestArch" "BlobNumber" "Number Char(3)"
dbpOpenTable "TestArch" "BlobNumber" ""
SetVar "[TestArch.BlobNummer.Number]" "0"
Else
dbpOpenTable "TestArch" "BlobNumber" ""
Endif


b) You have a missing EndIf ... before the dbpShowErrors "No"


If you still encounter problems ...

a) Place AlertBox commands to examine the navigation and field/variable values in your code

b) Might be a good idea to name fields other than Name and Number ... though not strictly part of the "reserved words set" ... could avoid a lot of problems in the future by not confusing the SQL syntax parser.
User avatar
Gaev
 
Posts: 3737
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 1 guest

cron