Raptor数据库异常错误? [英] Raptor Database Exception Error?

查看:185
本文介绍了Raptor数据库异常错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好吧,我尝试了代码,但起初似乎没有错误,直到尝试调试它为止.也许您可以看到我哪里出问题了?


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?


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:

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!!

推荐答案

根据异常的详细情况,以下行

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

反映异常指针. RaptorDB.Open函数中的第一个参数应该是文件路径,我相信这可能是这里的问题.
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.


这篇关于Raptor数据库异常错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆