vb.net²Ù×÷Êý¾Ý¿âÖ®ACCESS£¨3£©
ÕâһƪÎÒÔÙ˵˵ˮ¾§±¨±íµÄÇé¿ö¡£ACCESSÖжÔӦˮ¾§±¨±í·½Ã棬´ó¼Ò¿ÉÄÜ»áÓöµ½µÄ×î¶àµÄÎÊÌâÓ¦¸Ã¾ÍÊÇ´ò¿ª±¨±íºó
»á³öÏÖÐèÒªµÇ¼µÄÎÊÌâ¡£
Õâ¸öÊÇΪʲôÄØ£¿Ã÷Ã÷ÎÒûÓÐÉèÖÃÃÜÂ룬Ôõô»áÓÐÒªÊäÈëÃÜÂëÄØ£¿Èç¹ûÄã¹»³Á×Å£¬Èç¹ûÄãµÄdebug¾Ñ鲻ȱ·¦µÄ»°£¬
Äã»á·¢ÏÖÔÚË®¾§±¨±íÌø³öÊäÈëÃÜÂëµÄµÇ¼¿òÖУ¬accessµÄ·¾¶²»ÊÇÎÒÏÖÔÚÊý¾Ý¿â·ÅÖõÄλÖã¬ÈÔÈ»ÊÇÎÒÔÚ±àÂëµÄʱºò
Ñ¡ÔñµÄÊý¾Ý¿âµØÖ·¡£ËûΪʲôûÓбäÄØ£¿ÆäʵÕâ¸öʱºòÄãÐèÒªÎÊ£¬Õâ¸öµØַΪʲôҪ±ä£¿
µ±ÄãʹÓù«Ó÷þÎñÆ÷µÄʱºò£¬¿ÉÄܲ»»á³öÏÖÕâ¸öÎÊÌ⣬ÒòΪÄã²»¹Üµ½Äĸö¿Í»§¶ËʹÓ㬷þÎñÆ÷µØÖ·²»»á±ä¡£È»¶øÄãÓÃaccess£¬
µ±Êý¾Ý¿â¸ú×Å»»Á˵çÄԺ󣬷þÎñÆ÷µØÖ·µ±È»Ò²±äÁË£¬¶øÄã±àÂëÖеĵØַȴûÓб䣬Õâ¸ö¾ÍÊÇÎÊÌâ³öÏÖµÄÔÒò¿©£¡Ã÷°×ÁË°É£¿
ÆäʵÊǺܼòµ¥µÄÒ»¸öµÀÀí¡£
ÄÇÔõô°ìÄØ£¿ÀϹæ¾Ø£¬¿´´úÂë¡£
‘Êý¾Ý¿âÁ¬½Ó
DBConnection.ConnectionString = DB_CnStr()
DBConnection.Open()
'¿ªÊ¼²éѯ
Dim sql As New System.Text.StringBuilder
Dim DT As New DataTable
sql.Append(" SELECT * from WORDINFO")
Dim cmd As New OleDb.OleDbCommand(sql.ToString, DBConnection)
Dim RS As OleDb.OleDbDataAdapter = New OleDb.OleDbDataAdapter(cmd)
DT = New DataTable
RS.Fill(DT)
DBConnection.Close()
’ÒÔÉϾÍÊÇÊý¾Ý¿âÀï²éѯ£¬ÏÂÃæ¾ÍÊǰѲéѯ½á¹û¸øË®¾§±¨±íÀ´ÏÔʾ¡£
’Ïȶ¨Ò屨±íµÄλÖ㬽Ó×Ŷ¨ÒåÒ»¸ö±¨±íÒ³Ã棬ȻºóÊÇÒ»¸ö×Ô¶¯µÇ¼Êý¾Ý¿âµÄ
Dim reportPath As String = Application.StartupPath & "\" & "CrystalReport.rpt"
Dim rptDoc As New CrystalDecisions.CrystalReports.Engine.ReportDocument
Dim logonInfo As New CrystalDecisions.Shared.TableLogOnInfo
rptDoc.Load(reportPath)
‘ÕâÀï¾ÍÊÇÉèÖÃÊý¾Ý¿âµÇ¼µÄÐÅÏ¢£¬ACCESSÖÐÓÐÕ˺ÅÃÜÂëµÄ»°¾ÍÌûÓеĻ°¾ÍÈ«²¿¿Õ£¬
’Èç¹ûÆäËûµÄÊý¾Ý¿â£¬Èçsql¾ÍÒªÌî·þÎñÆ÷ºÍÊý¾Ý¿âÃû³ÆÁË
logonInfo.ConnectionInfo.ServerName = ""
logonInfo.ConnectionInfo.DatabaseName = ""
logonInfo.ConnectionInfo.UserID = ""
logonInfo.ConnectionInfo.Password = ""
rptDoc.Database.Tables(0)
Ïà¹ØÎĵµ£º
1¡¢´´½¨¿Ø¼þ£ºlbl1¡¢txt1¡¢lbl2¡¢cmd1
2¡¢lbl1.caption=ÊäÈëÈÕÆÚ£¨ÈÎÒ»ÖÖÕýÈ·¸ñʽ£©£º
ÉèÖÃlbl1¡¢txt1¡¢lbl2¡¢cmd1µÄ×ÖÌå´óС¼°ÑÕÉ«£»
3¡¢Ë«»÷°´Å¥“È·ÈÏ”£¬Ìí¼Ó´úÂ룬Ч¹ûΪ£º
Option Explicit
Private Sub cmd1_Click()
&nb ......
len£¨string£©£º¼ÆËã×Ö·û´®³¤¶Èº¯Êý¡£·µ»Ø×Ö·û´®stringÖÐ×Ö·ûµÄ¸öÊý¡£Ò»¸öºº×ÖΪһ¸ö×Ö·û£¬¿Õ¸ñҲΪһ¸ö×Ö·û£¬¿Õ×Ö·û´®µÄ³¤¶ÈΪ0.
Ltrim£¨string£©¡¢Rtrim£¨string£©¡¢Trim£¨string£©£º
Ltrim£¨string£©º¯Êý¹¦ÄÜÊÇ·µ»Øɾ³ýÁË×Ö·û´®string×ó±ß¿Õ¸ñÖ®ºóÊ£ÓàµÄ²¿·Ö¡£
Rtrim£¨string£©º¯Êý¹¦ÄÜÊÇ·µ»Øɾ³ýÁË×Ö·û´®ÖÐstringÓ ......
Option Explicit
Private Const ERROR_CACHE_FIND_FAIL As Long = 0
Private Const ERROR_CACHE_FIND_SUCCESS As Long = 1
Private Const ERROR_FILE_NOT_FOUND As Long = 2
Private Const ERROR_ACCESS_DENIED As Long = 5
Private Const ERROR_INSUFFICIENT_BUFFER As Long = 122
Private Const MAX_PATH As Long ......
Ò»Ö±ÏëдÏÂÊý¾Ý¿â²Ù×÷·½ÃæµÄ£¬Ö»ÊÇûʲôʱ¼ä£¨ºÃÏñÊǽè¿Ú£¬Ó¦¸ÃÊÇÀÁ»òÕßûÐÄÇé°É£¬ºÇºÇ£©¡£×î½ü·¢ÏÖCSDNÉÏ
»¹ÊÇÿÌìÓÐÈËÒªÎÊÕâЩÄÚÈÝ£¬ÎÒÓеÄʱºò¾ÍÀÁµÄ»Ø´ð£¬ºÇºÇ£¬Ö÷Òª²»¶ÏµÄÈ¥ÕÒ´úÂë¸øËûÃÇÀÛ°¡¡£ËùÒÔ»¹ÊÇÌý¸ßÈ˵ģ¬À´
¸öÒ»ÀÍÓÀÒÝ£¬×Ô¼ºÖØÐÂÎÂÏ°Ï£¬Ò²ºÃ¸øÆäËûÈËһЩ°ïÖú¡£
Õâ¸öÊ ......
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.OleDb;
/// <summary>
/// Data ......