Unable to extract path from the FolderItem


i want to create a sqlite database within my webapp. When i place the sqlite-file in the same folder as my webapp, all went fine. Now i want to place my database in a subfolder “database”. I use the following code to create the database.

I get the Error “Unable to extract path from the FolderItem.” Seems that folder is not there. But it is in my project-folder.

Any ideas?

[code] //Datendank erstellen
Dim dbFile As New FolderItem
dbFile = GetFolderItem(“database”).Child(“taskplaner.sqlite”)

If dbFile <> Nil And dbFile.Exists Then
End If

myDatabase = New SQLiteDatabase
myDatabase.DatabaseFile = dbFile

If myDatabase.CreateDatabaseFile Then
myDatabaseIsConnected = True
StatusTextField.Text = “SQLite Datenbank erstellt.”
myDatabaseIsConnected = False
StatusTextField.Text = "Fehler beim Erstellen der SQLite Datenbank: " + myDatabase.ErrorMessage
End If[/code]

Ok, seems that i managed it by adding this folder-creation-code:

Dim dbFolder As FolderItem = GetFolderItem("database") if Not dbFolder.Exists Then dbFolder.CreateAsFolder end if