SybaseHelper 类?
我正在尝试连接到 sybase ASE 15 并调用执行某些 DML 的 SP。我想知道是否有人有任何指向类似于 SQLhelper.cs 的 sybase 帮助程序类的指针,或者是否有人有任何指向任何博客/示例代码的指针。
最终,我将把解决方案迁移到 SQl Server 2008 R2(几个月后),所以我想创建一个通用的实现,即使在迁移之后也无需太多更改即可使用。
I am trying to connect to sybase ASE 15 and call a SP that does some DML. I was wondering if anyone has any pointers to a sybase helper class analogous to SQLhelper.cs or if someone has any pointers to any blog / sample code.
Eventually I will be migrating the solution to SQl Server 2008 R2 (couple of months from now) so I want to create a generic implementation which can be used without much change even after migration.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
}
}
接口
——以这种方式调用它将调用显式垃圾收集
}
}
Interface
--Calling it this way will invoke the expliciti garbage Collection
如果您正在为 Sybase(或 MS)开发 SQL,您最好使用开发工具,例如 SQLProgrammer 或 Rapid SQL。它通过消除体力劳动来提高生产力。
如果你没有这个,那么Sybase附带的实用程序就足够了,但你需要学习使用目录。字符界面的 isql 或在 GUI 界面中提供命令和结果集窗口的 DBISQL。
在服务器上打开会话后,键入以下 SQL 命令。它们执行查询目录的系统存储过程:
exec sp_help (object_name) -- 包括表和存储过程
exec sp_helptext
有 30 个这样的询问。
我想您已经意识到存储过程可以做的不仅仅是简单的插入;处理各种数据类型作为参数,并且您发布的代码只是一个简单的示例,而不是完整的代码。一般来说,为了使存储过程能够从 Java 应用程序执行,我们需要提供一个包装器(在 SQL 端)。
If you're developing SQL for Sybase (or MS) you are best off using a Developer tool, such as SQLProgrammer or Rapid SQL. It improves productivity by eliminating the manual labour.
If you do not have that, then the utilities that come with Sybase are quite adequate, but you need to learn to use the catalogue. Either isql for a character interface or DBISQL which provides Command and ResultSet windows in a GUI interface.
Once you have a session open on the server, type the following SQL commands. These execute system stored procedures that interrogate the catalogue:
exec sp_help (object_name) -- including tables and sprocs
exec sp_helptext
There are 30 such interrogatories.
I take it you realise that sprocs can do much more than simple INSERTS; handle various Datatypes as parameters, and that your posted code is only a simple example, not the full quid. Generally, to enable stored procs for execution from Java apps, we need to provide a wrapper (on the SQL side).