TAILIEUCHUNG - Tài liệu lập trình Export và Import ra tập tin text từ Access (VB)

Tham khảo tài liệu 'tài liệu lập trình export và import ra tập tin text từ access (vb)', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Copyright http Export và Import ra tập tin text từ Access VB Hiện nay các bạn yêu thích lập trình sử dụng Access là nguồn chứa dữ liệu khá phổ biến vì đơn giản dễ quản trị và đáp ứng được yêu cầu công việc. Hôm nay chúng tôi xin giới thiệu một đoạn code để export và import ra tập tin text từ Access VB Export Text Flat file từ Access Ms-Access Option Explicit Public Sub Export_Table_2_TextFile On Error GoTo LocalErrorHandler Dim dbCompany As Database Dim rsGeneral As Recordset Dim ExpGeneral As PubExpGeneral Dim blnTab_Text As Boolean Dim FullName As String Dim FileHandle As Byte Dim strFileToExport As String Dim chkFileExist As String Give Path with File name FullName E General Thu muc chua du lieu ban co the thay doi theo nhu cau của minh blnTab_Text False Set dbCompany OpenDatabase FullName Ví dụ tên bang la Company Set rsGeneral Company dbOpenTable With ExpGeneral .EmpNumber No. .EmpName Name .EmpAddress Address .EmpCity City Sử dụng TAB hoăc dấu phẩy If blnTab_Text Then .Delimiter1 Chr 9 .Delimiter2 Chr 9 .Delimiters Chr 9 Else .Delimited Chr 44 .Delimiter2 Chr 44 .Delimiters Chr 44 End If .CRLF vbCrLf End With FileHandle FreeFile Tên tập tin strFileToExport C chkFileExist Dir strFileToExport If chkFileExist Then 1 Copyright http Kill strFileToExport End If Open strFileToExport For Random As FileHandle Len Len ExpGeneral Put FileHandle ExpGeneral Do Until With ExpGeneral .EmpNumber rsGeneral EmpNo .EmpName rsGeneral EmpName .EmpAddress rsGeneral EmpAddress .EmpCity rsGeneral EmpCity End With Put FileHandle ExpGeneral Loop Set rsGeneral Nothing Close FileHandle Exit Sub LocalErrorHandler MsgBox Error Occured Error End Sub Import Text vào Ms-Access Public Sub Import_TextFile_2_Table On Error GoTo LocalErrorHandler Dim dbCompany As Database Dim rsGeneral As Recordset Dim FullName As String Dim FileHandle As Byte Dim ImportRecord As

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.