2020国产成人精品视频,性做久久久久久久久,亚洲国产成人久久综合一区,亚洲影院天堂中文av色

分享

jsp連接sybase數(shù)據(jù)庫中文顯示問題終極解決辦法! - sybase

 johnlane 2007-06-30

jsp連接sybase數(shù)據(jù)庫中文顯示問題終極解決辦法!

作者:asp.net   |   閱讀全文   |   時間:2007-04-12
jsp連接sybase數(shù)據(jù)庫中文顯示問題終極解決辦法! :

作者 滿勝

這兩天被如題的問題纏繞,好不容易解決掉了

當(dāng)時遇到的問題如下:

sybase運行在unix上,編碼未知,jsp頁面顯示查詢數(shù)據(jù)中文亂碼
pageencoding和charset都已設(shè)置,tomcat的xml文件也已設(shè)置
已經(jīng)試過的辦法有:
1.  string temp = rssearch.getstring(a[i]);
  if (temp != null) {
  byte[] b = temp.getbytes ("8859_1");
  temp = new string(b,"gbk");
  out.print(temp);
  }
2.string temp = rssearch.getstring(a[i]);
 
  byte[] buffer = new byte[temp.length()];
  int j=0;
  for (int i = 0; i<temp.length(); i++)
  {
  if (temp.charat(i)>=0x100)
  {
  char c = temp.charat(i);
  byte[] buf = (""+c).getbytes();
  buffer[j++] = (byte)buf[0];
  buffer[j++] = (byte)buf[1];
  }
  else
  {
  buffer[j++] = (byte)temp.charat(i);
  }
  }
  temp= new string(buffer, 0, j);

    ......

2

JDBC連接SYBASE的3種方法

作者:asp.net   |   閱讀全文   |   時間:2007-04-12
JDBC連接SYBASE的3種方法 :
1.單用一個jsp文件測試sybase jconnect-5_2 jdbc數(shù)據(jù)庫接口:


<%@ page contenttype="text/html;charset=gb2312" %>
<%@ page import="java.sql.*" %>
<html>
<head>
<title> jsp測試sybase jconnect-5_2 jdbc數(shù)據(jù)庫接口 </title>
<meta name="generator" content="editplus2.11">
<meta name="author" content="naxin">
</head>
<body>
<center>jsp測試sybase jconnect-5_2 jdbc數(shù)據(jù)庫接口</center>
<br><br>
<table border=3 align=center >
    ......

3

PowerBuilder連接Sybase SQL Server的注意事項

作者:asp.net   |   閱讀全文   |   時間:2007-04-12
PowerBuilder連接Sybase SQL Server的注意事項:
  首先, 確認(rèn)open client 已經(jīng)安裝, 并正確配置, 且能夠通過wisql
或sybase advantage查詢server端數(shù)據(jù)庫中的數(shù)據(jù).

powerbuilder連接不上sybase數(shù)據(jù)庫, 主要原因有以下幾點:

1) locales.dat 未正確設(shè)置

locales.dat 是client端字符集設(shè)置文件, 一般在c:\sybase\locales\
目錄下。若操作系統(tǒng)平臺是windows 95, 則修改[nt]節(jié)下的相關(guān)
內(nèi)容;若操作系統(tǒng)平臺是windows 3.x, 則修改[win3]節(jié)下的相關(guān)
內(nèi)容。
a、應(yīng)該有一行有關(guān)中國的國別設(shè)置:
locale = chs, us_english, iso_1
b、client端的缺省字符集設(shè)置應(yīng)該和server端的字符集設(shè)置一致。
本例中將client端的缺省字符集設(shè)為iso_1:
locale = default, us_english, iso_1

    ......

4

ADO連接數(shù)據(jù)庫字符串大全(VP,Excel,文本,Sybase,.NET等)

作者:asp.net   |   閱讀全文   |   時間:2007-04-12
ADO連接數(shù)據(jù)庫字符串大全(VP,Excel,文本,Sybase,.NET等):
ado連接數(shù)據(jù)庫字符串大全(vp,excel,文本,sybase,.net等)

this page contains sample ado connection strings for odbc dsn / dsn-less,
ole db providers, remote data services (rds), ms remote, ms datashape.

also included are ado.net connection strings for each .net managed provider
(sqlclient, oledb, and odbc).

these sample connection strings are compiled
by carl prothman, a microsoft visual basic mvp
enjoy!

 
table of contents
    ......

5

.NET中使用oledb連接sybase和csv格式文件的連接

作者:asp.net   |   閱讀全文   |   時間:2007-04-12
.NET中使用oledb連接sybase和csv格式文件的連接:

前段時候看了一些.net中連接數(shù)據(jù)庫的大全,發(fā)現(xiàn)不是很全,特別是sybase和csv這兩個數(shù)據(jù)使用方式,現(xiàn)在把我的連接方式供大家參考。


sybase(oledb)


首先需要安裝12.5的ole客戶端,在配置程序中添加data source.然后再.net中就可以使用了。


provider=sybase.aseoledbprovider.2;initial catalog=數(shù)據(jù)庫名;user id=用戶名;data source=數(shù)據(jù)源;extended properties="";server name=ip地址;network protocol=winsock;server port address=5000;


或者直接使用.net的傻瓜式的創(chuàng)建新連接。


 


csv


oledb


select *
from opendatasource (microsoft.jet.oledb.4.0,

    ......

    本站是提供個人知識管理的網(wǎng)絡(luò)存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點。請注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購買等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊一鍵舉報。
    轉(zhuǎn)藏 分享 獻(xiàn)花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約

    類似文章 更多