Minying's Blog

Just another WordPress.com weblog

Posts Tagged ‘ADO.NET’

計算字串有幾個相同的字

Posted by minying 於 4 二月, 2009

加入參考

Imports System.Text.RegularExpressions       

Dim text1 As String = “A,B,C,D,E"
Dim regex1 As New Regex(“[,]")
MessageBox.Show(regex1.Matches(text1).Count.ToString)

Posted in VB.NET | 已加上的標籤: | Leave a Comment »

使用程式建立DataSet

Posted by minying 於 4 二月, 2009

有些時候需要動態去產生一些DataSet,DataTable,DataColumn,DataRow,並將資料填入DatatRow中,可使用程式碼的方式來建立。以下做個小小的使用記錄。

繼續閱讀文章 »

Posted in ADO.NET | 已加上的標籤: | Leave a Comment »

DataSet宣告於全域變數時,DataAdapter.Fill後造成資料重複

Posted by minying 於 22 十二月, 2008

DataSet宣告於全域變數時(宣告在所有程序的外層),DataAdapter.Fill後造成DataSet中的Table資料重複,所以在Fill資料前,應先判別Dataset的Table是否存在!若存在先清除,可避免資料重複的問題!

繼續閱讀文章 »

Posted in ADO.NET | 已加上的標籤: | Leave a Comment »

VB.NET 連結 Access2003 加密的MDB檔

Posted by minying 於 22 十二月, 2008

假如 MDB 檔在 Access 2003 中的 “工具 | 安全性 | 設定資料庫密碼",則 VB.NET 透過 OleDbConnection 的連線參數必須加上 Jet OLEDB:Database Password=你的密碼,否則,可能出現"無法啟動您的應用程式。工作群組的資料檔案不見了或被另一個使用者以獨佔方式開啟“錯誤訊息。以下是一個一個簡單的範例:

繼續閱讀文章 »

Posted in VB.NET | 已加上的標籤: | Leave a Comment »

ADO 連線字串範例

Posted by minying 於 1 十二月, 2008

ADO Connection String Samples

This page contains sample ADO connection strings for ODBC DSN / DSN-Less, OLE DB Providers, Remote Data Services (RDS), MS Remote, and MS DataShape.Also included are ADO.NET connection strings for MySQL, ODBC, OLE DB, Oracle, and SQL Server .NET Data Providers.

These sample connection strings are compiled by Carl Prothman, a Microsoft ASP.NET MVP and Microsoft Certified Professional (MCP)

If you have an ADO or ADO.NET connection string that is not listed below, or you see an connection string that does not have the correct setting, please send an email to Carl Prothman.  Thanks!

繼續閱讀文章 »

Posted in VB.NET | 已加上的標籤: , | Leave a Comment »