HSQLDB忽略大小写(HSQLDB ignore case)
在java中使用此代码:
Connection c = jdbcDriver.getConnection("jdbc:hsqldb:mem:test;sql.ignore_case=true", null); Statement stmt = c.createStatement(); stmt.executeUpdate("CREATE TABLE \"TEST\"(ID INT)"); stmt.executeQuery("SELECT id FROM \"test\";");
抛出org.hsqldb.HsqlException
Exception in thread "main" java.sql.SQLSyntaxErrorException: user lacks privilege or object not found: test at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source) at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source) at org.hsqldb.jdbc.JDBCStatement.fetchResult(Unknown Source) at org.hsqldb.jdbc.JDBCStatement.executeQuery(Unknown Source) at Test.main(Test.java:15) Caused by: org.hsqldb.HsqlException: user lacks privilege or object not found: test at org.hsqldb.error.Error.error(Unknown Source) at org.hsqldb.error.Error.error(Unknown Source) at org.hsqldb.ParserDQL.readTableName(Unknown Source) at org.hsqldb.ParserDQL.readTableOrSubquery(Unknown Source) at org.hsqldb.ParserDQL.XreadTableReference(Unknown Source) at org.hsqldb.ParserDQL.XreadFromClause(Unknown Source) at org.hsqldb.ParserDQL.XreadTableExpression(Unknown Source) at org.hsqldb.ParserDQL.XreadQuerySpecification(Unknown Source) at org.hsqldb.ParserDQL.XreadSimpleTable(Unknown Source) at org.hsqldb.ParserDQL.XreadQueryPrimary(Unknown Source) at org.hsqldb.ParserDQL.XreadQueryTerm(Unknown Source) at org.hsqldb.ParserDQL.XreadQueryExpressionBody(Unknown Source) at org.hsqldb.ParserDQL.XreadQueryExpression(Unknown Source) at org.hsqldb.ParserDQL.compileCursorSpecification(Unknown Source) at org.hsqldb.ParserCommand.compilePart(Unknown Source) at org.hsqldb.ParserCommand.compileStatements(Unknown Source) at org.hsqldb.Session.executeDirectStatement(Unknown Source) at org.hsqldb.Session.execute(Unknown Source) ... 3 more
但为什么? 我说
ignore_case=true
!请看这个链接: http : //hsqldb.org/doc/guide/dbproperties-chapt.html#N15A0A
Having this code in java:
Connection c = jdbcDriver.getConnection("jdbc:hsqldb:mem:test;sql.ignore_case=true", null); Statement stmt = c.createStatement(); stmt.executeUpdate("CREATE TABLE \"TEST\"(ID INT)"); stmt.executeQuery("SELECT id FROM \"test\";");
Throws a org.hsqldb.HsqlException
Exception in thread "main" java.sql.SQLSyntaxErrorException: user lacks privilege or object not found: test at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source) at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source) at org.hsqldb.jdbc.JDBCStatement.fetchResult(Unknown Source) at org.hsqldb.jdbc.JDBCStatement.executeQuery(Unknown Source) at Test.main(Test.java:15) Caused by: org.hsqldb.HsqlException: user lacks privilege or object not found: test at org.hsqldb.error.Error.error(Unknown Source) at org.hsqldb.error.Error.error(Unknown Source) at org.hsqldb.ParserDQL.readTableName(Unknown Source) at org.hsqldb.ParserDQL.readTableOrSubquery(Unknown Source) at org.hsqldb.ParserDQL.XreadTableReference(Unknown Source) at org.hsqldb.ParserDQL.XreadFromClause(Unknown Source) at org.hsqldb.ParserDQL.XreadTableExpression(Unknown Source) at org.hsqldb.ParserDQL.XreadQuerySpecification(Unknown Source) at org.hsqldb.ParserDQL.XreadSimpleTable(Unknown Source) at org.hsqldb.ParserDQL.XreadQueryPrimary(Unknown Source) at org.hsqldb.ParserDQL.XreadQueryTerm(Unknown Source) at org.hsqldb.ParserDQL.XreadQueryExpressionBody(Unknown Source) at org.hsqldb.ParserDQL.XreadQueryExpression(Unknown Source) at org.hsqldb.ParserDQL.compileCursorSpecification(Unknown Source) at org.hsqldb.ParserCommand.compilePart(Unknown Source) at org.hsqldb.ParserCommand.compileStatements(Unknown Source) at org.hsqldb.Session.executeDirectStatement(Unknown Source) at org.hsqldb.Session.execute(Unknown Source) ... 3 more
But why? I said
ignore_case=true
!See this link: http://hsqldb.org/doc/guide/dbproperties-chapt.html#N15A0A
原文:https://stackoverflow.com/questions/47536402
更新时间:2022-04-10 22:04
最满意答案
它不像我想要的那么简单,但是在vbAccelerator上有一个很好的类调用ShellLink.cs
此代码使用互操作性,但不依赖于WSH。
使用这个类,创建快捷方式的代码是:
private static void configStep_addShortcutToStartupGroup() { using (ShellLink shortcut = new ShellLink()) { shortcut.Target = Application.ExecutablePath; shortcut.WorkingDirectory = Path.GetDirectoryName(Application.ExecutablePath); shortcut.Description = "My Shorcut Name Here"; shortcut.DisplayMode = ShellLink.LinkDisplayMode.edmNormal; shortcut.Save(STARTUP_SHORTCUT_FILEPATH); } }
It's not as simple as I'd have liked, but there is a great class call ShellLink.cs at vbAccelerator
This code uses interop, but does not rely on WSH.
Using this class, the code to create the shortcut is:
private static void configStep_addShortcutToStartupGroup() { using (ShellLink shortcut = new ShellLink()) { shortcut.Target = Application.ExecutablePath; shortcut.WorkingDirectory = Path.GetDirectoryName(Application.ExecutablePath); shortcut.Description = "My Shorcut Name Here"; shortcut.DisplayMode = ShellLink.LinkDisplayMode.edmNormal; shortcut.Save(STARTUP_SHORTCUT_FILEPATH); } }
相关问答
更多-
将应用程序快捷方式固定到Windows(7,8)任务栏(Pinning an application shortcut to the Windows (7,8) taskbar)[2022-03-04]
在别处找到我的答案。 VBScript是要走的路! http://www.codeproject.com/Articles/185512/Programmatically-PIN-shortcut-onto-Taskbar-on-Win7 Found my answer elsewhere. VBScript is the way to go! http://www.codeproject.com/Articles/185512/Programmatically-PIN-shortcut-onto-Task ... -
下列中不属于面向对象的编程语言的是?[2022-05-30]
a -
它不像我想要的那么简单,但是在vbAccelerator上有一个很好的类调用ShellLink.cs 此代码使用互操作性,但不依赖于WSH。 使用这个类,创建快捷方式的代码是: private static void configStep_addShortcutToStartupGroup() { using (ShellLink shortcut = new ShellLink()) { shortcut.Target = Application.ExecutablePat ...
-
使用此示例代码,我可以在安装时添加两个快捷方式 A)应用程序的ShortCut B)ShortCut链接到安装文件夹不,您无法确定安装快捷方式的顺序。 要实现您想要的,您应该采用另一种方式:使用System.AppUserModel.ExcludeFromShowInNewInstall标记所有辅助快捷方式。 只需将ShortcutProperty元素添加为ShortcutProperty的子元素:这似乎我需要新的眼睛:/在路径名中很难看到错字(l而不是i)... It's seems I need new eyes :/ There was a hard to see typo (l instead of i) in path name...在启动快捷方式时,Windows会将工作目录更改为在快捷方式中指定的目录中的开始字段。 此时,Windows没有记忆快捷方式的存储位置。 您可以将Start in字段更改为指向快捷方式所在的目录。但是,您必须为每个快捷方式都做到这一点,并且永远不要犯错。 更好的方法是使用脚本,而不是快捷方式。 将您的实际Python脚本(例如我们将称为doit.py )放在您的PYTHONPATH某处。 然后创建一个导入它的单行Python脚本: import doit 保存它(但不要将它命名为doit.py )并将其复 ...
Linux更改目录快捷方式(Linux Change directory shortcut)[2023-06-30]
在你的功能中,当你这样做 echo `pwd` | sed -e "s/$1/$2/g" echo的输出被传送到sed并进行更改。 sed会将其输出打印到标准输出。 但是, cd不会向输出写入任何内容,因此您将转到当前目录( pwd ),然后将(空)输出传送到sed以替换目录。 相反,您可以使用sed通过pwd输出的参数调用cd 。 以下是您想要的代码: cds() { cd $(pwd | sed -e "s/$1/$2/g") pwd } 首先,这将评估$()的代码,即 ...从exe4-j文档.. ,似乎这可以在exe4j项目中配置。 Working directory For some applications (especially GUI applications) you might want to change the working directory to a specific directory relative to the executable, for example to read config files that are in a fixed loc ...出现此问题的原因是您没有为msiexec设置工作目录,然后它将使用当前目录,引发错误2911(无法删除该文件夹)。 添加对WindowsFolder的引用:... 然后修改添加属性WorkingDirectory="WindowsFolder"快捷方式:相关文章
更多- 罗兰贝格case interview面经
- 《无懈可击的WEB设计(第2版)》(Bulletproof Web Design: Improving flexibility and protecting against worst-case scenarios with XHTML and CSS (2nd Edition))扫描版[PDF]
- Hadoop 0.21如何运行单个test case
- ibatis 返回map 类型的结果 map key 大小写设置
- Hadoop集群对机器名大小写敏感
- 《CMMI+敏捷整合开发:更快改进性能的案例与实用技术》( Integrating CMMI and Agile Development: Case Studies and Proven Techniques for Faster Performance Improvement )扫描版[PDF]
- Solr4.6,搜索不区分大小写的配置
- HttpClient 获取HTTPS证书和忽略证书错误
- EasyNet开源项目计划
- Json.Net学习笔记(十三) 缩小序列化Json的大小
最新问答
更多- 如何检索Ember.js模型的所有属性(How to retrieve all properties of an Ember.js model)
- maven中snapshot快照库和release发布库的区别和作用
- arraylist中的搜索元素(Search element in arraylist)
- 从mysli_fetch_array中获取选定的值并输出(Get selected value from mysli_fetch_array and output)
- Windows Phone上的可用共享扩展(Available Share Extensions on Windows Phone)
- 如何在命令提示符下将日期设置为文件名(How to set file name as date in command prompt)
- 如何在Laravel 5.2中使用paginate与关系?(How to use paginate with relationships in Laravel 5.2?)
- 从iframe访问父页面的id元素(accessing id element of parent page from iframe)
- linux的常用命令干什么用的
- Feign Client + Eureka POST请求正文(Feign Client + Eureka POST request body)
- 怎么删除禁用RHEL/CentOS 7上不需要的服务
- 为什么Gradle运行测试两次?(Why does Gradle run tests twice?)
- 由于有四个新控制器,Auth刀片是否有任何变化?(Are there any changes in Auth blades due to four new controllers?)
- 如何交换返回集中的行?(How to swap rows in a return set?)
- 在android中的活动之间切换?(Switching between activities in android?)
- Perforce:如何从Depot到Workspace丢失文件?(Perforce: how to get missing file from Depot to Workspace?)
- Webform页面避免运行服务器(Webform page avoiding runat server)
- 在ios 7中的UITableView部分周围绘制边界线(draw borderline around UITableView section in ios 7)
- 内存布局破解(memory layout hack)
- 使用Boost.Spirit Qi和Lex时的空白队长(Whitespace skipper when using Boost.Spirit Qi and Lex)
- 我们可以有一个调度程序,你可以异步添加东西,但会同步按顺序执行吗?(Can we have a dispatcher that you can add things todo asynchronously but will be executed in that order synchronously?)
- “FROM a,b”和“FROM a FULL OUTER JOIN b”之间有什么区别?(What is the difference between “FROM a, b” and “FROM a FULL OUTER JOIN b”?)
- Java中的不可变类(Immutable class in Java)
- bat批处理文件结果导出到txt
- WordPress发布查询(WordPress post query)
- 如何在关系数据库中存储与IPv6兼容的地址(How to store IPv6-compatible address in a relational database)
- 是否可以检查对象值的条件并返回密钥?(Is it possible to check the condition of a value of an object and JUST return the key?)
- 德州新起点计算机培训学校主要课程有什么?
- GEP分段错误LLVM C ++ API(GEP segmentation fault LLVM C++ API)
- “latin1_german1_ci”整理来自哪里?(Where is “latin1_german1_ci” collation coming from?)