以Access庫調(diào)用為例(SQL相應(yīng)可能需要改?通配符)
10年積累的成都網(wǎng)站設(shè)計(jì)、成都做網(wǎng)站經(jīng)驗(yàn),可以快速應(yīng)對(duì)客戶對(duì)網(wǎng)站的新想法和需求。提供各種問題對(duì)應(yīng)的解決方案。讓選擇我們的客戶得到更好、更有力的網(wǎng)絡(luò)服務(wù)。我雖然不認(rèn)識(shí)你,你也不認(rèn)識(shí)我。但先做網(wǎng)站設(shè)計(jì)后付款的網(wǎng)站建設(shè)流程,更有紅河免費(fèi)網(wǎng)站建設(shè)讓你可以放心的選擇與我們合作。
1,在TableAdapter設(shè)置中用 ? 通配符創(chuàng)建帶查詢參數(shù)的fill(),getdata()方法。
2,在參數(shù)調(diào)用的時(shí)候,參數(shù)格式為: "%%" 要模糊查詢的字符串 "%%",即可。
綜上,就是在使用過程中帶%%參數(shù),而不是TableAdapter中帶通配符。(測(cè)試通過)
.NET自帶類支持GZIP算法壓縮/解壓流。
System.IO.Compression.GZipStream
這個(gè)類不能直接用來解壓.zip文件,看看老外怎么說的
It is possible, with extra code, to produce or read a zip file, with the help of GZipStream, but it is not trivial.
If you want to read or write Zip files, the best bet is to use a third party library, like DotNetZip. This library is free, and enables your applications to read or write zip files that contain multiple compressed files. These are standard zip files that can be opened by Windows Explorer, or WinZip, or other zip tools. It's simple to use. It works with VB, or c#, or any .NET language
總之,如果你要解壓ZIP文件,還是用第三方庫吧。
1.創(chuàng)建ADODB對(duì)象
2.連接數(shù)據(jù)庫
3.輸入查詢內(nèi)容,做 SELECT * FORM 數(shù)據(jù)表 WHERE 關(guān)鍵字段 Like "*" 輸入字符 "*;" 查詢
4.幫定DATAGRID到做查詢的ADODB.RecordClass對(duì)象上,即完成你的要求.要詳細(xì)代碼的加分哦.
用 Like
% = 任意數(shù)量的字符
?= 單個(gè)字符
類似簡易的正規(guī)則比對(duì)。
具體可參照MSDN
例:(以下代碼可以直接放到程序里執(zhí)行)
dim str as string
str = "abc123"
if str like "a%" then msgbox "yes"
if str like "%a%2%" then msgbox "yes"
if str like "%3" then msgbox "yes"
if str like "%3?" = false then msgbox "no"