Click here to Skip to main content
15,881,204 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Ok I have tried the code and at first it seems error free until I try to debug it. Maybe you can see where I have went wrong?


VB
Imports RaptorDB 

Public Class Form1 
Dim rap As RaptorDB.RaptorDB = RaptorDB.RaptorDB.Open("storage", 255, False, INDEXTYPE.HASH) 

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
 rap.Set("A1", "123456789") ' to set like a dictionary 
 Dim val As String = "" 
If rap.Get("A1", val) Then 
TextBox1.Text = val 
End If 
End Sub 
End Class


The error message I get is:
VB
System.InvalidOperationException was unhandled Message=An error occurred creating the form. See Exception.InnerException for details. The error is: Path cannot be the empty string or all whitespace. Source=RaptorDatabase Test StackTrace: at RaptorDatabase_Test.My.MyProject.MyForms.Create__Instance__[T](T Instance) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 190 at RaptorDatabase_Test.My.MyProject.MyForms.get_Form1() at RaptorDatabase_Test.My.MyApplication.OnCreateMainForm() in C:\Users\Admin\AppData\Local\Temporary Projects\RaptorDatabase Test\My Project\Application.Designer.vb:line 35 at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun() at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel() at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine) at RaptorDatabase_Test.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81 at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() InnerException: System.ArgumentException Message=Path cannot be the empty string or all whitespace. Source=mscorlib StackTrace: at System.IO.Directory.CreateDirectory(String path) at RaptorDB.RaptorDB.Initialize(String filename, Byte maxkeysize, Boolean AllowDuplicateKeys, INDEXTYPE idxtype) in C:\Users\Admin\Desktop\Raptor Database\RaptorDB\RaptorDB.cs:line 234 at RaptorDB.RaptorDB..ctor(String Filename, Byte MaxKeysize, Boolean AllowDuplicateKeys, INDEXTYPE idxtype) in C:\Users\Admin\Desktop\Raptor Database\RaptorDB\RaptorDB.cs:line 20 at RaptorDB.RaptorDB.Open(String Filename, Byte MaxKeysize, Boolean AllowDuplicateKeys, INDEXTYPE idxtype) in C:\Users\Admin\Desktop\Raptor Database\RaptorDB\RaptorDB.cs:line 53 at RaptorDatabase_Test.Form1..ctor() in C:\Users\Admin\AppData\Local\Temporary Projects\RaptorDatabase Test\Form1.vb:line 3 InnerException: An error occurred creating the form. See Exception.InnerException for details. 


The error is: Path cannot be the empty string or all whitespace.

Does anyone have a solution to this problem?


Thank you in advance!!
Posted
Updated 16-Sep-11 18:13pm
v2
Comments
Dr.Walt Fair, PE 17-Sep-11 0:13am    
Fixed formatting

1 solution

As per the exception details the following line

C:\Users\Admin\AppData\Local\Temporary Projects\RaptorDatabase Test\Form1.vb:line 3

reflects the exception pointer. The first parameter in the RaptorDB.Open function should be file path, I believe that could be the issue here.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900