Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共2 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:请教创建mdb文件

1楼
kk000 发表于:2024/12/27 13:53:00
     Private Sub addmdb()
        Dim databasePath As String = "D:\db45.mdb" '
        Dim connectionString As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & databasePath


        Using connection As New OleDbConnection(connectionString)
            Try
                connection.Open()
                Dim createTableSQL As String = "CREATE TABLE table1 (date1 DATE)"
                Using command As New OleDbCommand(createTableSQL, connection)
                    command.ExecuteNonQuery()
                End Using

            Catch ex As OleDbException
            Finally
                connection.Close()
            End Try
        End Using
    End Sub


一直提示 引发的异常:“System.Data.OleDb.OleDbException”(位于 System.Data.dll 中) 


通过

			   Dim databasePath As String = "D:\db45.mdb" ' 
				Try
            File.Create(databasePath)
            Console.WriteLine("文件创建成功!")
				Catch ex As IOException
            Console.WriteLine("创建文件时出错: "
				+ ex.Message)
				End
				Try

创建的mdb文件却无法读取


蓝板请帮忙看看
[此贴子已经被作者于2024/12/27 13:57:36编辑过]
2楼
有点蓝 发表于:2024/12/27 14:43:00
http://www.foxtable.com/bbs/dispbbs.asp?BoardID=2&ID=28811&skin=0
共2 条记录, 每页显示 10 条, 页签: [1]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .03125 s, 2 queries.