文章分类 - Sybase学习
摘要:一 ODBC方式连接 1 安装Sybase客户端,安装ODBC驱动,配置DSN<略> 2 连接代码 string strconn = "DSN=TEST;SRVR=TEST;DB=DB;UID=sa;PWD=;";OdbcConnection SybaseConn = new OdbcConnection(strconn);OdbcDataAdapter da = new OdbcDataAdapter("select * from TableName",SybaseConn);DataTable dt = new DataTable();d
阅读全文
摘要:Sybase 存储过程的创建和执行--返回值为int的存储过程create proc testReturn@tname varchar(12) ,@tid int outputasbeginset @tid = (select testid from Mytest where testname=@tname)returnend--返回值为varchar的存储过程create proc testReturnT@tid int ,@tname varchar(12) outputas begin set @tname = (select testname from Mytest where tes
阅读全文
摘要:最近工作上需要熟悉Oracle.,Sybase,之前自己一直用SQL ,虽然三者之间大方向上没什么不同但是在一些小细节上需要多加注意, 比如参数的调用using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Data;using System.Data.OracleClient;using System.Data.SqlClient;using System.Data.Odbc;using System.Data.OleDb;namespace SybaseTes
阅读全文
摘要:--使用该数据库use testDB--设置该用户为当前用户setuser 'testuser'--查看表结构sp_help tableName--查看视图/触发器语句sp_helptext viewname/triggerName--查看前十行数据set rowcount 10select * from tableName set rowcount 0--创建表create table Mytest( testid int , testname varchar(12), testtime datetime)--循环累加declare @i int , @sum int,@cs
阅读全文
摘要:一 客户端的安装 基本上选择Next就可以完成安装二 客户端配置 1 选择"开始---所有程序---Sybase---Desdit", 在弹出的"select directory service" 对话框选择确定 2 右键"server" 选择 "Add" 填写"server name " 然后"OK" 2.1 右键 Server Address 选择 modify attribute ----单击ADD填写相关信息 一般:protocol为TCP/IP Network Ad
阅读全文