https://github.com/mono/old-code

https://wiki.scn.sap.com/wiki/display/SQLANY/SQL+Anywhere+and+Microsoft+.NET

http://www.mono-project.com/docs/database-access/providers/sybase/

http://dcx.sybase.com/sa160/en/pdf/index.html

http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.help.sqlanywhere.12.0.1/dbprogramming/adodotnet-development-secta-3832474.html

示例數据庫:C:\Program Files\Sybase\SQL Anywhere 5.0\sademo.db
用戶名:DBA 密碼:sql
示例腳本: jcatalog.sql

if (exists (select * from sysobjects
where name = 'spt_datatype_info' and type = 'U'))
drop table spt_datatype_info
go
create table spt_datatype_info
(
ss_dtype tinyint not null,
TYPE_NAME varchar(30) not null,
DATA_TYPE smallint not null,
typelength int not null,
LITERAL_PREFIX varchar(32) null,
LITERAL_SUFFIX varchar(32) null,
CREATE_PARAMS varchar(32) null,
NULLABLE smallint not null,
CASE_SENSITIVE smallint not null,
SEARCHABLE smallint not null,
UNSIGNED_ATTRIBUTE smallint null,
FIXED_PREC_SCALE smallint not null,
-- MONEY smallint not null,
AUTO_INCREMENT smallint null,
LOCAL_TYPE_NAME varchar(128) not null,
MINIMUM_SCALE smallint null,
MAXIMUM_SCALE smallint null,
SQL_DATA_TYPE smallint null,
SQL_DATETIME_SUB smallint null,
NUM_PREC_RADIX smallint null
-- INTERVAL_PRECISION smallint null
)
go grant select on spt_datatype_info to PUBLIC
go insert into spt_datatype_info values
(48, 'tinyint', -6, 3, NULL, NULL, NULL, 1, 0, 2, 1, 0, 0, 'tinyint',
NULL, NULL, NULL, NULL, NULL)
insert into spt_datatype_info values
(34, 'image', -4, 2147483647, '0x', NULL, NULL, 1, 0, 1, NULL, 0, NULL,
'image', NULL, NULL, NULL, NULL, NULL)
insert into spt_datatype_info values
(37, 'varbinary', -3, 255, '0x', NULL, 'max length', 1, 0, 2, NULL, 0,
NULL, 'varbinary', NULL, NULL, NULL, NULL, NULL)
insert into spt_datatype_info values
(45, 'binary', -2, 255, '0x', NULL, 'length', 1, 0, 2, NULL, 0, NULL,
'binary', NULL, NULL, NULL, NULL, NULL)
insert into spt_datatype_info values
(35, 'text', -1, 2147483647, '''', '''', NULL, 1, 1, 1, NULL, 0, NULL,
'text', NULL, NULL, NULL, NULL, NULL)
insert into spt_datatype_info values
(47, 'char', 1, 255, '''', '''', 'length', 1, 1, 3, NULL, 0, NULL,
'char', NULL, NULL, NULL, NULL, NULL)
insert into spt_datatype_info values
(63, 'numeric', 2, 38, NULL, NULL, 'precision,scale', 1, 0, 2, 0, 0, 0,
'numeric', 0, 38, NULL, NULL, NULL)
insert into spt_datatype_info values
(55, 'decimal', 3, 38, NULL, NULL, 'precision,scale', 1, 0, 2, 0, 0, 0,
'decimal', 0, 38, NULL, NULL, NULL)
insert into spt_datatype_info values
(60, 'money', 3, 12, '$', NULL, NULL, 1, 0, 2, 0, 1, 0, 'money', NULL,
NULL, NULL, NULL, NULL)
insert into spt_datatype_info values
(122, 'smallmoney', 3, 8, '$', NULL, NULL, 1, 0, 2, 0, 1, 0,
'smallmoney', NULL, NULL, NULL, NULL, NULL)
insert into spt_datatype_info values
(56, 'int', 4, 4, NULL, NULL, NULL, 1, 0, 2, 0, 0, 0, 'int', NULL, NULL,
NULL, NULL, NULL)
insert into spt_datatype_info values
(52, 'smallint', 5, 2, NULL, NULL, NULL, 1, 0, 2, 0, 0, 0, 'smallint',
NULL, NULL, NULL, NULL, NULL)
insert into spt_datatype_info values
(62, 'float', 8, 8, NULL, NULL, NULL, 1, 0, 2, 0, 0, 0, 'double', NULL,
NULL, NULL, NULL, 10)
insert into spt_datatype_info values
(59, 'real', 7, 7, NULL, NULL, NULL, 1, 0, 2, 0, 0, 0, 'real', NULL,
NULL, NULL, NULL, 10)
insert into spt_datatype_info values
(61, 'datetime', 93, 23, '''', '''', NULL, 1, 0, 3, NULL, 0, NULL,
'datetime', NULL, NULL, 93, NULL, NULL)
insert into spt_datatype_info values
(58, 'smalldatetime', 93, 16, '''', '''', NULL, 1, 0, 3, NULL, 0, NULL,
'smalldatetime', NULL, NULL, 93, NULL, NULL)
insert into spt_datatype_info values
(39, 'varchar', 12, 255, '''', '''', 'max length', 1, 1, 3, NULL, 0,
NULL, 'varchar', NULL, NULL, NULL, NULL, NULL)
go if exists (select * from sysobjects where name =
'sp_jdbc_function_escapes')
begin
drop procedure sp_jdbc_function_escapes
end
go create procedure sp_jdbc_function_escapes
as
select * from DBA.jdbc_function_escapes go grant execute on sp_jdbc_function_escapes to PUBLIC
go /*
** sp_jdbc_tables
**
*/ if exists (select * from sysobjects where name = 'sp_jdbc_tables')
begin
drop procedure sp_jdbc_tables
end
go create procedure sp_jdbc_tables
@table_name varchar(128) = null,
@table_owner varchar(128) = null,
@table_qualifier varchar(128) = null,
@table_type varchar(64) = null
as
declare @id int
declare @searchstr char(10) if @table_name is null select @table_name = '%' select @id = id from sysobjects where name like @table_name
if (@id is null)
begin
raiserror 17461 'Table does not exist'
return (3)
end if (patindex('%table%',lcase(@table_type)) > 0)
select @table_type = 'base' if (patindex('%base%',lcase(@table_type)) > 0)
select @searchstr = 'base' else if (patindex('%view%',lcase(@table_type)) > 0)
select @searchstr = 'view' else if @table_type is null
select @searchstr = '%'
else
begin
raiserror 99998 'Only valid table types are TABLE, BASE, VIEW or null'
return(3)
end if @table_owner is null select @table_owner = '%' select
TABLE_CAT = substring(db_name(),1,length(db_name())),
TABLE_SCHEM= substring(user_name(creator),1,length(user_name(creator))),
TABLE_NAME = substring(table_name,1,length(table_name)),
TYBLE_TYPE = substring(table_type,1,length(table_type)),
REMARKS= remarks
from systable where table_name like @table_name and
user_name(creator) like @table_owner and table_type like @searchstr
order by TABLE_TYPE, TABLE_CAT, TABLE_SCHEM, TABLE_NAME go

  

Sybase SQL anywhere5.5的更多相关文章

  1. Csharp: read Sybase SQL anywhere5.5 using c#

    private void button1_Click(object sender, EventArgs e) { try { //OdbcConnection conn = new OdbcConne ...

  2. SUP (SAP Mobile SDK 2.2) 连接 Sybase SQL Anywhere sample 数据库

    安装了   SAP Mobile SDK 2.2   后发现,这个版本没有自带Sybase SQL Anywhere  数据库. 解决办法: 1. 免费下载 SQL Anywhere Develope ...

  3. SQL Anywhere5.5: Metadata

    http://dcx.sybase.com/1101/en/dbprogramming_en11/ianywhere-data-sqlanywhere-saconnection-getschem633 ...

  4. SQL 教程数据库包括:Oracle, Sybase, SQL Server, DB2, Access 等等,您将学到如何使用 SQL 访问和处理数据系统中的数据

    SQL 基础教程 SQL 教程 SQL 简介 SQL 语法 SQL select SQL distinct SQL where SQL AND & OR SQL Order By SQL in ...

  5. sybase sql anywhere 5.0 安装后sybase central中无法打开视图等的解决办法

    无法打开的原因初步分析要用英文版的xp,后来在如下处发现问题,是sql anywhere的版本太旧了, 可能没有使用Unicode编码,设置一下如下选项可以解决问题.

  6. sybase SQL记录

    在一个表中复制一行,主键是MLID ';

  7. [译]流言终结者 —— SQL Server 是Sybase的产品而不是微软的

    http://www.cnblogs.com/xxxtech/archive/2011/12/30/2307859.html by Euan Garden 这些年来我听说过关于这个流言的许多版本,其中 ...

  8. [转帖]流言终结者 —— “SQL Server 是Sybase的产品而不是微软的”

    流言终结者 —— “SQL Server 是Sybase的产品而不是微软的” https://www.cnblogs.com/xxxtech/archive/2011/12/30/2307859.ht ...

  9. FireDAC 连接SQL Server一些要注意的地方

    TFDConnection: FetchOptions.Mode 设置为fmAll, 返回全部结果, 否则默认只返回前50条, 效果与open以后再执行FetchAll一样 Specifies how ...

随机推荐

  1. maya2012卸载/安装失败/如何彻底卸载清除干净maya2012注册表和文件的方法

    maya2012提示安装未完成,某些产品无法安装该怎样解决呢?一些朋友在win7或者win10系统下安装maya2012失败提示maya2012安装未完成,某些产品无法安装,也有时候想重新安装maya ...

  2. 深圳scala-meetup-20180902(3)- Using heterogeneous Monads in for-comprehension with Monad Transformer

    scala中的Option类型是个很好用的数据结构,用None来替代java的null可以大大降低代码的复杂性,它还是一个更容易解释的状态表达形式,比如在读取数据时我们用Some(Row)来代表读取的 ...

  3. MySQL学习笔记2(多表操作)

    外键:使两张表之间存在关联 特点: 1.从表外键的值是对主表主键的引用 2.从表外键类型,必须与主表主键类型一致 示例: 创建两个表并准备数据: USE mybase; CREATE TABLE ca ...

  4. MySQL 组提交(group commit)

    目录 前言 改进 原理 实现 参数 注意 前言 操作系统使用页面缓存来填补内存和磁盘访问的差距 对磁盘文件的写入会先写入道页面缓存中 由操作系统来决定何时将修改过的脏页刷新到磁盘 确保修改已经持久化到 ...

  5. app自动化测试中的相关api

    这个说的api即python自动化测试中经常会使用到的一些api,具体如下: 1.find_element_by_id/find_elements_by_id 定位元素api,使用方法如下: driv ...

  6. web自动化测试---xpath方式定位页面元素

    在实际应用中,如果存在多个相同元素,包括属性相同时,一般会选用这种方式,当然如果定位属性唯一的话,也是可以使用的,不过这种方式没有像id,tag,name等容易理解,下面讲下xpath定位元素的方法 ...

  7. Kaggle-tiantic数据建模与分析

    1.数据可视化 kaggle中数据解释:https://www.kaggle.com/c/titanic/data 数据形式: 读取数据,并显示数据信息 data_train = pd.read_cs ...

  8. salesforce零基础学习(八十八)项目中的零碎知识点小总结(二)

    通过做项目以及群里面的一些大神的聊天,总结一下关于项目中的两个知识点,以后当做参考. 一. 在custom setting中配置集成接口信息后刷sandbox的问题 我们做项目时,经常会遇见和其他平台 ...

  9. oracle笔记--查询10条之后记录的数据

    本文版权归 远方的风lyh和博客园共有,欢迎转载,但须保留此段声明,并给出原文链接,谢谢合作. 由于之前一直在用mysql 对于oracle 的一些语法不太了解,自己有一次去面试让写一个oracle ...

  10. functions文件详细分析和说明

    bash&shell系列文章:http://www.cnblogs.com/f-ck-need-u/p/7048359.html /etc/rc.d/init.d/functions几乎被/e ...