05 2012 档案
摘要:oracle SQL代码 使用包返回结果集--存储过程查询结果集--创建包create or replace package packselectastype t_cursor is ref cursor;PROCEDURE testprocHYKHYXX( cur_name out t_cursor);end packselect ;;--创建包体create or replace package body packselectasPROCEDURE testprocHYKHYXX( cur_name out t_cursor)is begin open cur_name for sele.
阅读全文
摘要:一 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
阅读全文
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace SybaseTest{ class Program { static void Main(string[] args) { Multi_Table(); } public static void Multi_Table() { Console.WriteLine("-------------...
阅读全文
摘要:最近工作上需要熟悉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
阅读全文
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;using Microsoft.Win32;//注意引用该命名空间namespace Op_Regedit{ class Program { static void Main(string[] args) { //ReaderRegedit(); WriterRegedit(); // DeleteRegedit(); ...
阅读全文
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading;using System.Collections;using System.IO;namespace ThreadTest{ class Program { public static Thread[] iThread = new Thread[5]; public static ThreadStart[] iThreadStart = new T...
阅读全文
摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.IO;using System.Diagnostics;using System.Threading;namespace FileTest{ public partial class Form1 : Form ...
阅读全文
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.IO;using System.Net;namespace StreamTest{ class Program { static void Main(string[] args) { StreamWriter(); StreamReader(); } //写入流 public st...
阅读全文
摘要:C#异常处理一 : catch 之后是否会跳出异常 答案:不会using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace Test{ class Program { static void Main(string[] args) { int sum = 30; for (int i = 0; i < 30; i++) { try ...
阅读全文

浙公网安备 33010602011771号