注册 登录
编程论坛 VB.NET论坛

请教高手,如何用VB.net创建sqlite的临时(或内存)数据库和临时表?

yangmz 发布于 2021-11-23 15:38, 2158 次点击
SQLITE教程中有如何在sqlite中创建内存数据库的代码 ,但不知道如何用于
3 回复
#2
xyxcc1772021-12-03 14:37
这个与用创建和使用其它数据的方法是一样的
#3
BCCNLHP2021-12-05 16:43
下面就是在内存里建的数据表,用LINQ能像SQL一样方便地查询统计内存表   
        Dim dtResult As DataTable = New DataTable()
        dtResult = argDataTable.Clone
        For Each col As DataColumn In dtResult.Columns
            Select Case col.ColumnName
                Case "日期"
                    col.DataType = GetType(Date)
                Case "订单号"
                    col.DataType = GetType(Double)
                Case "客户工程名"
                    col.DataType = GetType(String)
                Case "产品型号"
                    col.DataType = GetType(String)
                Case "箱体尺寸"
                    col.DataType = GetType(String)
                Case "物料号"
                    col.DataType = GetType(String)
                Case "数量"
                    col.DataType = GetType(Double)
                Case "单件工时"
                    col.DataType = GetType(Double)
                Case "总工时"
                    col.DataType = GetType(Double)
                Case "包装木箱尺寸"
                    col.DataType = GetType(String)
                Case "分配日期"
                    col.DataType = GetType(Date)
                Case "完工日期"
                    col.DataType = GetType(Date)
                Case "生产小组"
                    col.DataType = GetType(String)
                Case "箱体情况"
                    col.DataType = GetType(String)
                Case "元器件情况"
                    col.DataType = GetType(String)
                Case "备注"
                   col.DataType = GetType(String)
            End Select
        Next
#4
yangmz2021-12-06 00:42
谢谢!
1