随笔分类 -  C#

摘要:好处:1、不安装客户端也能访问服务器上的oracle(假设Application Server与DB Server 分开)2、不需要安装ODAC3、不需要配置TnsNames.Ora文件缺点:不能使用odac for .net中对应的工具步骤:如果不安装Oracle11g的客户端则需要在程序的debug目录下拷贝如下几个dll文件oci.dlloracle.dataaccess.dlloraops11w.dlloraociei11.dll这几个文件可以从下载的ODAC安装包中找到,我下载的是ODTwithODAC112030.zip,由于这些文件都放在..\stage\Components\. 阅读全文
posted @ 2012-05-19 16:56 gisdream 阅读(9195) 评论(1) 推荐(0)
摘要:Oracle 数据访问组件 (ODAC) 全称:Oracle Data Access Components优点:由于微软在.net framework4中会将System.Data.OracleClient.dll deprecated,而且就访问效率和速度而言,System.Data.OracleClient.dll与 Oracle.DataAccess.dll相比,微软的确实没有oracle提供的类库有优势,所以我放弃了使用多年的 System.Data.OracleClient.dll,取而代之的是odp.net1. ODAC的安装服务器端:0racle10g,11g 都行客户端:ora 阅读全文
posted @ 2012-05-19 16:53 gisdream 阅读(34028) 评论(4) 推荐(2)
摘要:vs自动对齐文本快捷键:ctrl+k+d 阅读全文
posted @ 2012-05-07 10:59 gisdream 阅读(197) 评论(0) 推荐(0)
摘要:1、在oracle的sqlplus或其他工具中运行一下pl/sql块建立存储过程--------------------------------------------------------------分页存储过程--------------------------------------------------------------创建包create or replace package testpackage astype test_cursor is ref cursor;end testpackage;/ --创建过程create or replace procedure feny 阅读全文
posted @ 2011-11-16 20:27 gisdream 阅读(4131) 评论(2) 推荐(0)
摘要:一、Oracle方面 1.创建Oracle过程存储 1) 创建表create table users(usesNo number,userName varchar(50));2) 创建包CREATE OR REPLACE PACKAGE MultiRefCursors AS TYPE test_cursor IS REF CURSOR ; Procedure getRecord (p_cursor IN OUT test_cursor); END MultiRefCursors;/ 3) 创建存储过程create or replace package body MultiRefCursor.. 阅读全文
posted @ 2011-11-16 16:47 gisdream 阅读(834) 评论(0) 推荐(0)
摘要:1,在matlab中建一个m文件(test.m)例如:function test(h,D)for x=-10:0.1:10, if x>D y=h; hold on; plot(x,y) elseif x<-D y=-h; hold on; plot(x,y) else y=h/(D*x); hold on; plot(x,y) endend在MATLAB R2007a中输入deploytool命令(在matlab6.5中输入comtool),打开Matlab Build For .net窗口新建个工程,在此工程中“Add files”即填加test.m这个文件,b 阅读全文
posted @ 2011-08-17 10:03 gisdream 阅读(6287) 评论(1) 推荐(0)
摘要:using System.Web; /// <summary> /// Javascript常用方法 /// </summary> public class JS { private static string ScriptStart = "<script type=\"text/javascript\">"; private static string ScriptEnd = "</script>"; /// <summary> /// 写入JS脚本内容 /// </ 阅读全文
posted @ 2011-05-25 20:24 gisdream 阅读(2048) 评论(0) 推荐(0)
摘要:(1)将污染源对象以一定的格式保存到txt文本中 public bool SaveToTxtFile(List<pollutionSource> psList) { bool bResult = false; System.IO.FileStream FS = null; System.IO.StreamWriter SW = null; try { //新建文件流 FS = new System.IO.FileStream(Application.StartupPath + "/Data/info1.txt", System.IO.FileMode.Creat 阅读全文
posted @ 2011-02-23 10:37 gisdream 阅读(11793) 评论(1) 推荐(0)
摘要:有的时候vs无缘无故的出现如下错误:"因为此版本的应用程序不支持其项目类型(.csproj),若要打开它,请使用支持此类型项目的版本"解决办法:如果是这个提示,可能是由于你安装mssql是否导致的 问题     在命令行中请运行: devenv.exe /resetskippkgs 即可恢复 阅读全文
posted @ 2010-11-24 15:15 gisdream 阅读(8933) 评论(1) 推荐(1)
摘要:public enum TypeItemName{News,Bulletin,Dispatch}所以要怎麼把 string 轉成 enum 呢?很簡單只需要使用 Enum 內的 Enum.Parse 即可做到,請看說明。第三個參數為是否要大小寫完整,所以只需要 宣告enum 型別 轉enum 型別,就可以做到把字串轉為enum 。 阅读全文
posted @ 2010-10-29 11:15 gisdream 阅读(17198) 评论(0) 推荐(0)
摘要:在开始菜单打开:Microsoft Visual Studio 2008 >> Visual Studio Tools >> Visual Studio 2008命令提示在窗口中输入:devenv /resetuserdata运行完成后重新打开VS2008就可以重新设置默认环境 阅读全文
posted @ 2010-10-14 09:30 gisdream 阅读(1221) 评论(0) 推荐(0)
摘要:javascript获得当前文档的相对路径 function fRelativePath(sRelative) { // shawl.qiu code, return string var sUrl = document.URL; sUrl = sUrl.replace(/^.*?\:\/\/[^\/]+/, "").replace(/[^\/]+$/, ""); if(!sRelative)... 阅读全文
posted @ 2010-03-29 18:50 gisdream 阅读(1591) 评论(0) 推荐(0)