注册 登录
编程论坛 VFP论坛

vfp操作sqlite数据库?

su0527 发布于 2019-03-17 13:11, 7177 次点击
只有本站会员才能查看附件,请 登录


想通过vfp,把表中记录追加到上面解压后jxc.db数据库的一张表中。如何实现?(附件解压为:jxc.db ,好像是sqlite数据库。)
34 回复
#2
schtg2019-03-17 14:39
数据库目录如下,可以想办法添加信息的。
Database: [jxc]
    File name: C:\jxc\jxc.db
    File size: 355328 bytes
    Page size: 1024
    Encoding: UTF-8
    Auto vacuum: 0
    Tables: 30
    Views: 0
    Virtual Tables: 0
------------------------------------------------------------
Table [account_management]
    Fields: 21
        [id]: VARCHAR(100)
            NOT NULL
        [accountNumber]: VARCHAR(100)
        [accountName]: VARCHAR(100)
        [creditCode]: VARCHAR(100)
        [address]: VARCHAR(300)
        [provinceCode]: VARCHAR(300)
        [cityCode]: VARCHAR(300)
        [countyCode]: VARCHAR(300)
        [addressDetails]: VARCHAR(1000)
        [taxpayeCode]: VARCHAR(255)
        [remark]: VARCHAR(1000)
        [contactName]: VARCHAR(100)
        [contactWay]: VARCHAR(200)
        [depositBankName]: VARCHAR(100)
        [depositBankNumber]: VARCHAR(100)
        [depositBankAddress]: VARCHAR(500)
        [accountType]: VARCHAR(10)
        [isImp]: VARCHAR(10)
        [isConvert]: VARCHAR(10)
        [productLicenseCode]: VARCHAR(100)
        [businessLicenseCode]: VARCHAR(100)
    Indexes: 0
    Triggers: 0
    Table constraints:
        Primary Key:
            Fields: [id]
            On Conflict:
        Foreign Keys: 0
        Unique constraints: 0
        Check constraints: 0
Table [account_management] end
------------------------------------------------------------
Table [common_user]
    Fields: 9
        [id]: VARCHAR(100)
            NOT NULL
        [sex]: VARCHAR(20)
        [identityCode]: VARCHAR(100)
        [telphone]: VARCHAR(300)
        [wechat]: VARCHAR(100)
        [qq]: VARCHAR(255)
        [remark]: VARCHAR(1000)
        [username]: VARCHAR(100)
        [usernamesearch]: VARCHAR(100)
    Indexes: 0
    Triggers: 0
    Table constraints:
        Primary Key:
            Fields: [id]
            On Conflict:
        Foreign Keys: 0
        Unique constraints: 0
        Check constraints: 0
Table [common_user] end
------------------------------------------------------------
Table [customsetting]
    Fields: 3
        [customkey]: varchar(200)
        [customkeyvalue]: varchar(500)
        [btype]: VARCHAR(100)
    Indexes: 0
    Triggers: 0
    Table constraints:
        Primary Key:
            Fields: [customkey]
            On Conflict:
        Foreign Keys: 0
        Unique constraints: 0
        Check constraints: 0
Table [customsetting] end
------------------------------------------------------------
Table [profitloss_management]
    Fields: 13
        [id]: VARCHAR(100)
            NOT NULL
        [formId]: VARCHAR(50)
        [warehouseNum]: VARCHAR(20)
        [productsNumber]: VARCHAR(100)
        [productsName]: VARCHAR(255)
        [specification]: VARCHAR(100)
        [productUnit]: VARCHAR(300)
        [stockAmount]: VARCHAR(20)
        [profitLossNum]: VARCHAR(20)
        [productRemark]: VARCHAR(1000)
        [createDate]: VARCHAR(20)
        [updateDate]: VARCHAR(20)
        [createUserId]: VARCHAR(100)
    Indexes: 0
    Triggers: 0
    Table constraints:
        Primary Key:
            Fields: [id]
            On Conflict:
        Foreign Keys: 0
        Unique constraints: 0
        Check constraints: 0
Table [profitloss_management] end
------------------------------------------------------------
Table [profitloss_orders]
    Fields: 10
        [id]: VARCHAR(100)
            NOT NULL
        [handlers]: VARCHAR(100)
        [handlersUserId]: VARCHAR(100)
        [formCode]: VARCHAR(50)
        [warehouseNum]: VARCHAR(20)
        [reckonDate]: VARCHAR(20)
        [reckonNo]: VARCHAR(100)
        [createDate]: VARCHAR(20)
        [updateDate]: VARCHAR(20)
        [createUserId]: VARCHAR(100)
    Indexes: 0
    Triggers: 0
    Table constraints:
        Primary Key:
            Fields: [id]
            On Conflict:
        Foreign Keys: 0
        Unique constraints: 0
        Check constraints: 0
Table [profitloss_orders] end
------------------------------------------------------------
Table [purchase_management]
    Fields: 39
        [id]: VARCHAR(100)
            NOT NULL
        [handlers]: VARCHAR(30)
        [handlersUserId]: VARCHAR(100)
        [formCode]: VARCHAR(50)
        [formId]: VARCHAR(50)
        [twodimensionCode]: VARCHAR(32)
        [buyDate]: VARCHAR(20)
        [supplier]: VARCHAR(300)
        [productsNumber]: VARCHAR(50)
        [productsName]: VARCHAR(255)
        [productionBatch]: VARCHAR(100)
        [productionDate]: VARCHAR(20)
        [validUntil]: VARCHAR(20)
        [productUnit]: VARCHAR(300)
        [saleunit]: VARCHAR(300)
        [productUnivalence]: VARCHAR(20)
        [saleUnivalence]: VARCHAR(20)
        [warningDay]: VARCHAR(300)
        [goodsType]: VARCHAR(300)
        [relationNum]: decimal(15, 3)
        [productAmounts]: VARCHAR(20)
        [identifyCode]: VARCHAR(100)
        [warehouseNum]: VARCHAR(20)
        [specification]: VARCHAR(100)
        [purchaseAmount]: VARCHAR(20)
        [productStatus]: VARCHAR(10)
        [createDate]: VARCHAR(20)
        [updateDate]: VARCHAR(20)
        [createUserId]: VARCHAR(100)
        [salesReturnDate]: VARCHAR(20)
        [dataType]: VARCHAR(20)
        [correlationCode]: varchar(50)
        [salesAmounts]: varchar(20)
        [surplusAmounts]: varchar(20)
        [haveStockRecord]: VARCHAR(20)
        [agricultureNo]: VARCHAR(100)
        [restricpesticides]: VARCHAR(100)
        [productionLicenseCode]: VARCHAR(100)
        [companyName]: VARCHAR(100)
    Indexes: 0
    Triggers: 0
    Table constraints:
        Primary Key:
            Fields: [id]
            On Conflict:
        Foreign Keys: 0
        Unique constraints: 0
        Check constraints: 0
Table [purchase_management] end
------------------------------------------------------------
Table [purchase_orders]
    Fields: 20
        [id]: VARCHAR(100)
            NOT NULL
        [handlers]: VARCHAR(30)
        [handlersUserId]: VARCHAR(100)
        [formCode]: VARCHAR(50)
        [buyDate]: VARCHAR(20)
        [supplier]: VARCHAR(300)
        [warehouseNum]: VARCHAR(20)
        [productStatus]: VARCHAR(10)
        [totalMoney]: VARCHAR(20)
        [correlationCode]: varchar(50)
        [createDate]: VARCHAR(20)
        [updateDate]: VARCHAR(20)
        [createUserId]: VARCHAR(100)
        [salesReturnDate]: VARCHAR(20)
        [dataType]: VARCHAR(20)
        [haveStockRecord]: VARCHAR(20)
        [readyPay]: VARCHAR(20)
        [surplusPay]: VARCHAR(20)
        [returnMoney]: VARCHAR(20)
        [dataStatus]: VARCHAR(20)
    Indexes: 0
    Triggers: 0
    Table constraints:
        Primary Key:
            Fields: [id]
            On Conflict:
        Foreign Keys: 0
        Unique constraints: 0
        Check constraints: 0
Table [purchase_orders] end
------------------------------------------------------------
Table [purchase_standing_book]
    Fields: 23
        [id]: VARCHAR(100)
            NOT NULL
        [dataStatus]: VARCHAR(20)
        [restricpesticides]: VARCHAR(100)
        [productionLicenseCode]: VARCHAR(100)
        [SKUCode]: VARCHAR(900)
        [companyName]: VARCHAR(100)
        [supplierName]: VARCHAR(100)
        [licenseCode]: VARCHAR(100)
        [contactWay]: VARCHAR(200)
        [purchaseDate]: varchar(100)
        [twodimensionCode]: VARCHAR(32)
        [purchaseAmounts]: VARCHAR(20)
        [purchaseUnit]: VARCHAR(20)
        [agricultureNo]: VARCHAR(300)
        [productsName]: VARCHAR(255)
        [specification]: VARCHAR(100)
        [productionDate]: VARCHAR(20)
        [productionBatch]: VARCHAR(100)
        [dataType]: VARCHAR(100)
        [formId]: VARCHAR(100)
        [formCode]: VARCHAR(100)
        [dataId]: VARCHAR(100)
        [salesAmounts]: VARCHAR(100)
    Indexes: 0
    Triggers: 0
    Table constraints:
        Primary Key:
            Fields: [id]
            On Conflict:
        Foreign Keys: 0
        Unique constraints: 0
        Check constraints: 0
Table [purchase_standing_book] end
------------------------------------------------------------
Table [reckon_management]
    Fields: 28
        [id]: VARCHAR(100)
            NOT NULL
        [formId]: VARCHAR(50)
        [warehouseNum]: VARCHAR(20)
        [productsNumber]: VARCHAR(100)
        [productsName]: VARCHAR(255)
        [specification]: VARCHAR(100)
        [productionBatch]: VARCHAR(100)
        [reckonBatch]: VARCHAR(100)
        [stockAmount]: VARCHAR(20)
        [reckoningAmount]: VARCHAR(20)
        [profitLossNum]: VARCHAR(20)
        [productUnit]: VARCHAR(300)
        [productRemark]: VARCHAR(1000)
        [createDate]: VARCHAR(20)
        [updateDate]: VARCHAR(20)
        [createUserId]: VARCHAR(100)
        [cgunit]: varchar(30)
        [cgprice]: decimal(15, 3)
        [saleprice]: decimal(15, 3)
        [relationNum]: decimal(15, 3)
        [separateType]: decimal(1, 0)
        [productionDate]: varchar(100)
        [warningDay]: VARCHAR(300)
        [goodsType]: VARCHAR(300)
        [holderName]: VARCHAR(300)
        [companyName]: VARCHAR(300)
        [agricultureNo]: VARCHAR(300)
        [restricpesticides]: VARCHAR(20)
    Indexes: 0
    Triggers: 0
    Table constraints:
        Primary Key:
            Fields: [id]
            On Conflict:
        Foreign Keys: 0
        Unique constraints: 0
        Check constraints: 0
Table [reckon_management] end
------------------------------------------------------------
Table [reckon_orders]
    Fields: 12
        [id]: VARCHAR(100)
            NOT NULL
        [handlers]: VARCHAR(100)
        [handlersUserId]: VARCHAR(100)
        [formCode]: VARCHAR(50)
        [warehouseNum]: VARCHAR(20)
        [reckonDate]: VARCHAR(20)
        [createDate]: VARCHAR(20)
        [updateDate]: VARCHAR(20)
        [createUserId]: VARCHAR(100)
        [remark]: VARCHAR(1000)
        [updateType]: VARCHAR(10)
        [isReckon]: VARCHAR(10)
    Indexes: 0
    Triggers: 0
    Table constraints:
        Primary Key:
            Fields: [id]
            On Conflict:
        Foreign Keys: 0
        Unique constraints: 0
        Check constraints: 0
Table [reckon_orders] end
------------------------------------------------------------
Table [sales_management]
    Fields: 34
        [id]: VARCHAR(100)
            NOT NULL
        [handlers]: VARCHAR(100)
        [handlersUserId]: VARCHAR(100)
        [twodimensionCode]: VARCHAR(32)
        [restricpesticides]: VARCHAR(100)
        [sex]: VARCHAR(300)
        [formId]: VARCHAR(50)
        [formCode]: VARCHAR(50)
        [correlationCode]: VARCHAR(50)
        [salesDate]: VARCHAR(20)
        [clientName]: VARCHAR(300)
        [idCard]: VARCHAR(30)
        [companyName]: VARCHAR(300)
        [productsNumber]: VARCHAR(100)
        [productsName]: VARCHAR(255)
        [productUnit]: VARCHAR(300)
        [productUnivalence]: VARCHAR(20)
        [productAmounts]: VARCHAR(20)
        [purchaseAmount]: VARCHAR(20)
        [identifyCode]: VARCHAR(100)
        [specification]: VARCHAR(100)
        [productStatus]: VARCHAR(10)
        [totalMoney]: VARCHAR(20)
        [createDate]: VARCHAR(20)
        [updateDate]: VARCHAR(20)
        [createUserId]: VARCHAR(100)
        [salesNumber]: VARCHAR(20)
        [surplusAmounts]: VARCHAR(20)
        [salesReturnDate]: VARCHAR(20)
        [dataType]: VARCHAR(20)
        [haveStockRecord]: VARCHAR(20)
        [agricultureNo]: VARCHAR(100)
        [productionLicenseCode]: VARCHAR(100)
        [salesType]: VARCHAR(20)
    Indexes: 0
    Triggers: 0
    Table constraints:
        Primary Key:
            Fields: [id]
            On Conflict:
        Foreign Keys: 0
        Unique constraints: 0
        Check constraints: 0
Table [sales_management] end
------------------------------------------------------------
Table [sales_orders]
    Fields: 30
        [id]: VARCHAR(100)
            NOT NULL
        [handlers]: VARCHAR(30)
        [handlersUserId]: VARCHAR(100)
        [restricpesticides]: VARCHAR(100)
        [formCode]: VARCHAR(50)
        [returnCode]: VARCHAR(50)
        [salesDate]: VARCHAR(20)
        [companyName]: VARCHAR(300)
        [clientName]: VARCHAR(300)
        [sex]: VARCHAR(300)
        [idCard]: VARCHAR(300)
        [phone]: VARCHAR(30)
        [address]: VARCHAR(300)
        [totalMoney]: VARCHAR(20)
        [accountMoney]: VARCHAR(20)
        [practicalMoney]: VARCHAR(20)
        [advancePayment]: VARCHAR(20)
        [creditAccount]: VARCHAR(20)
        [returnMoney]: VARCHAR(20)
        [barCode]: VARCHAR(300)
        [createDate]: VARCHAR(20)
        [updateDate]: VARCHAR(20)
        [createUserId]: VARCHAR(100)
        [salesReturnDate]: VARCHAR(20)
        [productStatus]: VARCHAR(10)
        [dataType]: VARCHAR(20)
        [haveStockRecord]: VARCHAR(20)
        [salesType]: VARCHAR(20)
        [dataStatus]: VARCHAR(20)
        [remark]: VARCHAR(1000)
    Indexes: 0
    Triggers: 0
    Table constraints:
        Primary Key:
            Fields: [id]
            On Conflict:
        Foreign Keys: 0
        Unique constraints: 0
        Check constraints: 0
Table [sales_orders] end
------------------------------------------------------------
Table [sales_standing_book]
    Fields: 22
        [id]: VARCHAR(100)
            NOT NULL
        [dataStatus]: VARCHAR(20)
        [agricultureNo]: VARCHAR(300)
        [productsName]: VARCHAR(255)
        [specification]: VARCHAR(100)
        [restricpesticides]: VARCHAR(100)
        [companyName]: VARCHAR(100)
        [productionLicenseCode]: VARCHAR(100)
        [buyers]: VARCHAR(100)
        [buyersIDCard]: VARCHAR(100)
        [salesDate]: varchar(100)
        [twodimensionCode]: VARCHAR(32)
        [goodsNo]: VARCHAR(900)
        [productionDate]: VARCHAR(20)
        [productionBatch]: VARCHAR(100)
        [salesAmounts]: VARCHAR(20)
        [saleunit]: varchar(30)
        [dataType]: VARCHAR(100)
        [formId]: VARCHAR(100)
        [formCode]: VARCHAR(100)
        [salesType]: VARCHAR(10)
        [dataId]: VARCHAR(100)
    Indexes: 0
    Triggers: 0
    Table constraints:
        Primary Key:
            Fields: [id]
            On Conflict:
        Foreign Keys: 0
        Unique constraints: 0
        Check constraints: 0
Table [sales_standing_book] end
------------------------------------------------------------
Table [sqlite_master]
    Fields: 5
        [type]: TEXT
        [name]: TEXT
        [tbl_name]: TEXT
        [rootpage]: INTEGER
        [sql]: TEXT
    Indexes: 0
    Triggers: 0
    Table constraints:
        Primary Key:
            Fields:
            On Conflict:
        Foreign Keys: 0
        Unique constraints: 0
        Check constraints: 0
Table [sqlite_master] end
------------------------------------------------------------
Table [t_company]
    Fields: 13
        [id]: varchar(100)
        [enterpriseName]: varchar(500)
        [creditCode]: varchar(500)
        [enterpriseProperty]: varchar(100)
        [address]: varchar(1000)
        [zipCode]: varchar(100)
        [businessScope]: varchar(1000)
        [sellRestrictivePesticide]: varchar(500)
        [streetOther]: varchar(500)
        [businessLicenseCode]: VARCHAR(100)
        [phone]: VARCHAR(20)
        [userName]: VARCHAR(20)
        [uploadKey]: VARCHAR(50)
    Indexes: 0
    Triggers: 0
    Table constraints:
        Primary Key:
            Fields:
            On Conflict:
        Foreign Keys: 0
        Unique constraints: 0
        Check constraints: 0
Table [t_company] end
------------------------------------------------------------
Table [t_enter_apply]
    Fields: 11
        [id]: varchar(100)
        [userId]: varchar(100)
        [userName]: varchar(50)
        [enterNo]: varchar(100)
        [enterDate]: varchar(100)
        [warehouseNo]: varchar(100)
        [busType]: decimal(2, 0)
        [relationCode]: varchar(100)
        [goodsIds]: varchar(2000)
        [supplierId]: varchar(100)
        [supplierName]: varchar(500)
    Indexes: 0
    Triggers: 0
    Table constraints:
        Primary Key:
            Fields: [id];[enterNo]
            On Conflict:
        Foreign Keys: 0
        Unique constraints: 0
        Check constraints: 0
Table [t_enter_apply] end
------------------------------------------------------------
Table [t_goodsbrands]
    Fields: 5
        [id]: varchar(300)
        [brandsNo]: varchar(900)
        [brandsName]: varchar(900)
        [state]: varchar(30)
        [remark]: varchar(3000)
    Indexes: 0
    Triggers: 0
    Table constraints:
        Primary Key:
            Fields:
            On Conflict:
        Foreign Keys: 0
        Unique constraints: 0
        Check constraints: 0
Table [t_goodsbrands] end
------------------------------------------------------------
Table [t_goodsinfo]
    Fields: 30
        [id]: VARCHAR(100)
            NOT NULL
        [goodsNo]: VARCHAR(900)
        [goodsName]: VARCHAR(100)
        [goodsType]: VARCHAR(300)
        [specification]: VARCHAR(300)
        [warningDay]: VARCHAR(300)
        [cgunit]: varchar(30)
        [saleunit]: varchar(30)
        [relationNum]: decimal(15, 3)
        [agricultureNo]: VARCHAR(300)
        [agricultureName]: VARCHAR(300)
        [agricultureTypeName]: VARCHAR(300)
        [agricultureTypeCode]: VARCHAR(300)
        [agricultureDate]: VARCHAR(300)
        [agricultureState]: VARCHAR(300)
        [holderName]: VARCHAR(300)
        [holderId]: VARCHAR(300)
        [uniqueCode]: VARCHAR(30)
        [state]: VARCHAR(30)
        [restricpesticides]: VARCHAR(20)
        [productcode]: VARCHAR(300)
        [remark]: VARCHAR(900)
        [saleprice]: VARCHAR(20)
        [numberx]: int(20)
        [regularCode]: VARCHAR(20)
        [productionLicenseCode]: VARCHAR(100)
        [companyName]: VARCHAR(100)
        [specificationType]: VARCHAR(100)
        [goodsNameSearch]: VARCHAR(100)
        [twodimensionCode]: VARCHAR(100)
    Indexes: 0
    Triggers: 0
    Table constraints:
        Primary Key:
            Fields: [id]
            On Conflict:
        Foreign Keys: 0
        Unique constraints: 0
        Check constraints: 0
Table [t_goodsinfo] end
------------------------------------------------------------
Table [t_goodstype]
    Fields: 7
        [id]: varchar(100)
        [name]: varchar(200)
        [pId]: varchar(100)
        [nodeLevel]: int(11)
        [levelOrder]: int(11)
        [disabled]: tinyint(1)
        [typeCode]: varchar(20)
    Indexes: 0
    Triggers: 0
    Table constraints:
        Primary Key:
            Fields: [id]
            On Conflict:
        Foreign Keys: 0
        Unique constraints: 0
        Check constraints: 0
Table [t_goodstype] end
------------------------------------------------------------
Table [t_goodsunit]
    Fields: 4
        [id]: varchar(100)
        [name]: varchar(200)
        [levelOrder]: int(11)
        [typeCode]: varchar(20)
    Indexes: 0
    Triggers: 0
    Table constraints:
        Primary Key:
            Fields: [id]
            On Conflict:
        Foreign Keys: 0
        Unique constraints: 0
        Check constraints: 0
Table [t_goodsunit] end
------------------------------------------------------------
Table [t_inventory]
    Fields: 25
        [id]: varchar(100)
            NOT NULL
        [goodsType]: VARCHAR(30)
        [warehouseNo]: varchar(100)
        [goodsNo]: varchar(100)
        [twodimensionCode]: varchar(100)
        [goodsName]: varchar(100)
        [specification]: varchar(100)
        [productionBatch]: varchar(100)
        [productionDate]: varchar(100)
        [validDate]: varchar(100)
        [cgunit]: varchar(30)
        [cgprice]: decimal(15, 3)
        [cgnum]: decimal(15, 3)
        [saleunit]: varchar(100)
        [saleprice]: decimal(15, 3)
        [relationNum]: decimal(15, 3)
        [salenum]: decimal(15, 3)
        [separateType]: decimal(1, 0)
        [enternum]: decimal(15, 3)
        [enterNo]: varchar(100)
        [warningDay]: VARCHAR(300)
        [agricultureNo]: VARCHAR(100)
        [restricpesticides]: VARCHAR(100)
        [productionLicenseCode]: VARCHAR(100)
        [companyName]: VARCHAR(100)
    Indexes: 0
    Triggers: 0
    Table constraints:
        Primary Key:
            Fields: [id]
            On Conflict:
        Foreign Keys: 0
        Unique constraints: 0
        Check constraints: 0
Table [t_inventory] end
------------------------------------------------------------
Table [t_othersystem_setup]
    Fields: 5
        [id]: varchar(100)
        [salenum]: decimal(15, 3)
        [earlywarnDays]: varchar(100)
        [inventoryWarning]: varchar(100)
        [batchWarning]: varchar(100)
    Indexes: 0
    Triggers: 0
    Table constraints:
        Primary Key:
            Fields: [id]
            On Conflict:
        Foreign Keys: 0
        Unique constraints: 0
        Check constraints: 0
Table [t_othersystem_setup] end
------------------------------------------------------------
Table [t_out_apply]
    Fields: 11
        [id]: varchar(100)
        [userId]: varchar(100)
        [userName]: varchar(50)
        [outerNo]: varchar(100)
        [outerDate]: varchar(100)
        [warehouseNo]: varchar(100)
        [outType]: decimal(2, 0)
        [relationCode]: varchar(100)
        [goodsIds]: varchar(2000)
        [accountId]: varchar(100)
        [saccountName]: varchar(500)
    Indexes: 0
    Triggers: 0
    Table constraints:
        Primary Key:
            Fields: [id];[outerNo]
            On Conflict:
        Foreign Keys: 0
        Unique constraints: 0
        Check constraints: 0
Table [t_out_apply] end
------------------------------------------------------------
Table [t_out_goods]
    Fields: 20
        [id]: varchar(100)
        [warehouseNo]: varchar(100)
        [goodsNo]: varchar(100)
        [twodimensionCode]: varchar(100)
        [goodsName]: varchar(100)
        [specification]: varchar(100)
        [productionBatch]: varchar(100)
        [productionDate]: varchar(100)
        [validDate]: varchar(100)
        [saleunit]: varchar(100)
        [saleprice]: decimal(15, 3)
        [salenum]: decimal(15, 3)
        [enterNo]: varchar(100)
        [outremark]: varchar(100)
        [outmoney]: varchar(100)
        [inventoryids]: varchar(2000)
        [agricultureNo]: VARCHAR(100)
        [restricpesticides]: VARCHAR(100)
        [productionLicenseCode]: VARCHAR(100)
        [companyName]: VARCHAR(100)
    Indexes: 0
    Triggers: 0
    Table constraints:
        Primary Key:
            Fields: [id]
            On Conflict:
        Foreign Keys: 0
        Unique constraints: 0
        Check constraints: 0
Table [t_out_goods] end
------------------------------------------------------------
Table [t_repayment]
    Fields: 9
        [id]: VARCHAR(100)
            NOT NULL
        [handlers]: VARCHAR(30)
        [handlersUserId]: VARCHAR(100)
        [formCode]: VARCHAR(50)
        [payDate]: VARCHAR(20)
        [clientName]: VARCHAR(300)
        [idCard]: VARCHAR(300)
        [phone]: VARCHAR(30)
        [advancePayment]: VARCHAR(20)
    Indexes: 0
    Triggers: 0
    Table constraints:
        Primary Key:
            Fields: [id]
            On Conflict:
        Foreign Keys: 0
        Unique constraints: 0
        Check constraints: 0
Table [t_repayment] end
------------------------------------------------------------
Table [t_serial_number]
    Fields: 4
        [id]: VARCHAR(100)
            NOT NULL
        [createDate]: VARCHAR(20)
        [numberx]: int(20)
        [regularCode]: VARCHAR(20)
    Indexes: 0
    Triggers: 0
    Table constraints:
        Primary Key:
            Fields: [id]
            On Conflict:
        Foreign Keys: 0
        Unique constraints: 0
        Check constraints: 0
Table [t_serial_number] end
------------------------------------------------------------
Table [t_specification]
    Fields: 2
        [id]: VARCHAR(100)
            NOT NULL
        [specification]: VARCHAR(200)
    Indexes: 0
    Triggers: 0
    Table constraints:
        Primary Key:
            Fields: [id]
            On Conflict:
        Foreign Keys: 0
        Unique constraints: 0
        Check constraints: 0
Table [t_specification] end
------------------------------------------------------------
Table [t_specificationtype]
    Fields: 3
        [id]: VARCHAR(100)
            NOT NULL
        [levelOrder]: int(11)
        [specification]: VARCHAR(200)
    Indexes: 0
    Triggers: 0
    Table constraints:
        Primary Key:
            Fields: [id]
            On Conflict:
        Foreign Keys: 0
        Unique constraints: 0
        Check constraints: 0
Table [t_specificationtype] end
------------------------------------------------------------
Table [t_sys_region]
    Fields: 12
        [id_]: double
        [name_]: varchar(300)
        [pid_]: double
        [value_]: double
        [code_]: double
        [order_]: double
        [status_]: double
        [level_]: varchar(150)
        [level_code_]: double
        [alias_]: varchar(300)
        [name_en_]: varchar(600)
        [department_id_]: varchar(300)
    Indexes: 0
    Triggers: 0
    Table constraints:
        Primary Key:
            Fields:
            On Conflict:
        Foreign Keys: 0
        Unique constraints: 0
        Check constraints: 0
Table [t_sys_region] end
------------------------------------------------------------
Table [xp_user]
    Fields: 7
        [id]: varchar(96)
        [loginName]: varchar(96)
        [name]: varchar(300)
        [role]: Decimal(11)
        [password]: varchar(300)
        [state]: Decimal(2)
        [remark]: VARCHAR(1000)
    Indexes: 0
    Triggers: 0
    Table constraints:
        Primary Key:
            Fields:
            On Conflict:
        Foreign Keys: 0
        Unique constraints: 0
        Check constraints: 0
Table [xp_user] end
#3
su05272019-03-17 18:32
回复 2楼 schtg
Table [sales_standing_book]
vfp怎样才能把 .dbf中记录追加到上面的表里呢?
#4
su05272019-03-17 19:05
意思是:用vfp 把表中记录追加到另一数据库的 Table [sales_standing_book]表中。
#5
schtg2019-03-17 19:57
回复 4楼 su0527
不好意思,恰好正赶上忙着,而且我没有研究过这种数据库,平时就用一用mysql。
你上网查一下资料,摸索一下,有问题提出来,会有行家为你解答的。
待我稍空时实践一下才能回答你哈,谢谢!
#6
su05272019-03-17 20:01
回复 5楼 schtg
谢!
#7
su05272019-03-18 08:48
有懂vfp通过odbc操作.db数据库全程步骤的,请指点一下。
#8
fyyylyl2019-03-18 10:01
cn=SQLSTRINGCONNECT("driver={SQLite3 ODBC Driver};database=C:\jxc\jxc.db")之后参考有关ODBC操作SQL的方法
#9
su05272019-03-18 12:38
此句之前还要做些什么?
#10
fyyylyl2019-03-18 14:39
连接好数据库和操作DBF差不多吧
#11
xuminxz2019-03-18 22:04
连接好数据库后建立远程视图,注意:视图中要设定可更新字段,并选择更新。视图就与一个dbf表一样追加记录。
#12
su05272019-03-19 08:52
数据库接不上呀!
#13
dzy1232019-03-19 09:13
可能要安装db库驱动
#14
su05272019-03-19 11:40
能利用vfp修改
只有本站会员才能查看附件,请 登录
中sales_standing_book表的,并且实际操作成功的,请介绍一下详细过程。急需!能指导咱成功实现的,不胜感激!
#15
fyyylyl2019-03-19 15:14
只有本站会员才能查看附件,请 登录
只操作一个表吗?字段编码规则是什么?
#16
su05272019-03-19 20:02
回复 15楼 fyyylyl
是的,只操作一个表。
#17
su05272019-03-19 20:17

只有本站会员才能查看附件,请 登录

只有本站会员才能查看附件,请 登录


想要把jhxx.dbf表中字段(登记证号、商品名称、生产企业、规格、数量、供应商、录入时间)七个字段的值追加到sales_standing_book对应(agrculturNo、productsName、companyName、specification、salesAmounts、buyers、salesDate)七个字段中。

#18
su05272019-03-20 08:01
回复 15楼 fyyylyl
字段编码规则如下:
只有本站会员才能查看附件,请 登录

#19
su05272019-03-20 08:07
字段:pdno、goods、company、spec、quantity、supplier、lrsj   对应的标题是:登记证号、商品名称、生产企业、规格、数量、供应商、录入时间
#20
fyyylyl2019-03-20 09:01
加我QQ吧:330274961
#21
yewxj2019-03-20 15:52
在网上找的“DevartODBCSQLite.exe”建立的ODBC连接
-------------------------
CLEAR
_Dir=SET("DEFAULT") + SYS(2003) + "\"
_SQL=SQLSTRINGCONNECT("Driver=Devart ODBC Driver for SQLite;database="+_Dir+"jxc.db")
IF !USED('jhxx')
    USE jhxx ALIAS jhxx IN 0
ENDIF

*-表字段和数据库字段类型不一致,怀疑由此导致不能批量插入,期望老师们讲解。
*?SQLEXEC(_SQL,"INSERT INTO id,sales_standing_book (agricultureno,productsName,companyName,specification,salesAmounts,buyers,salesDate) SELECT pdno as 'id',pdno,goods,company,spec,quantity,supplier,lrsj FROM jhxx")
SELECT jhxx
GOTO TOP
DO WHILE !EOF()
    a0 = pdno    &&数据库ID字段作为主键,内容不能空且重复
    a1 = pdno
    a2 = goods
    a3 = company
    a4 = spec
    a5 = quantity
    a6 = supplier
    a7 = lrsj
    ?SQLEXEC(_SQL,"INSERT INTO sales_standing_book (id,agricultureno,productsName,companyName,specification,salesAmounts,buyers,salesDate) VALUES (?a0,?a1,?a2,?a3,?a4,?a5,?a6,?a7)")
    SKIP +1
ENDDO

?SQLEXEC(_SQL,"select id,agricultureno,productsName,companyName,specification,salesAmounts,buyers,salesDate from sales_standing_book")
BROWSE
只有本站会员才能查看附件,请 登录
只有本站会员才能查看附件,请 登录
只有本站会员才能查看附件,请 登录
#22
yewxj2019-03-20 15:52
在网上找的“DevartODBCSQLite.exe”建立的ODBC连接
-------------------------
CLEAR
_Dir=SET("DEFAULT") + SYS(2003) + "\"
_SQL=SQLSTRINGCONNECT("Driver=Devart ODBC Driver for SQLite;database="+_Dir+"jxc.db")
IF !USED('jhxx')
    USE jhxx ALIAS jhxx IN 0
ENDIF

*-表字段和数据库字段类型不一致,怀疑由此导致不能批量插入,期望老师们讲解。
*?SQLEXEC(_SQL,"INSERT INTO id,sales_standing_book (agricultureno,productsName,companyName,specification,salesAmounts,buyers,salesDate) SELECT pdno as 'id',pdno,goods,company,spec,quantity,supplier,lrsj FROM jhxx")
SELECT jhxx
GOTO TOP
DO WHILE !EOF()
    a0 = pdno    &&数据库ID字段作为主键,内容不能空且重复
    a1 = pdno
    a2 = goods
    a3 = company
    a4 = spec
    a5 = quantity
    a6 = supplier
    a7 = lrsj
    ?SQLEXEC(_SQL,"INSERT INTO sales_standing_book (id,agricultureno,productsName,companyName,specification,salesAmounts,buyers,salesDate) VALUES (?a0,?a1,?a2,?a3,?a4,?a5,?a6,?a7)")
    SKIP +1
ENDDO

?SQLEXEC(_SQL,"select id,agricultureno,productsName,companyName,specification,salesAmounts,buyers,salesDate from sales_standing_book")
BROWSE
只有本站会员才能查看附件,请 登录
只有本站会员才能查看附件,请 登录
只有本站会员才能查看附件,请 登录
#23
yewxj2019-03-20 15:54
只有本站会员才能查看附件,请 登录
#24
yewxj2019-03-20 15:54
只有本站会员才能查看附件,请 登录
#25
yewxj2019-03-20 15:56
发一次回复,怎么出来两个回复?
#26
su05272019-03-20 20:50
回复 22楼 yewxj
初步实现了,其实问题正在查找 ;万分感谢!!!
#27
su05272019-03-20 21:05
回复 22楼 yewxj
连编后,拿给别人用,不知道能不能也一样实现该功能。(假设别人电脑d盘nzjxc文件夹中也固定会有jxc.db; 在别人电脑上没有安装odbc这个程序的情况下,会不会就不能实现了。)

使用情景是:我自己开发一个vfp数据库程序;可是主管部门要求使用他们的软件;两软件功能差不多,但没有自己的好用,而且他们只看一下进销数据表(jxc.db),
所心我想平时使用自己的系统vfp,在软件的destroy事件中,把销售数据,注入他们的软件的jxc.cb数据文件中,以备主管部门可以用他们要求使用的软件查看一下数据就可以了。

另外,同行别的朋友也有此需要。问能不能也用我的软件,同时还能把每天的销售数注入到主管部门要求使用的软件中。
#28
su05272019-03-20 22:06
回复 22楼 yewxj
在另一个没有安装odbc的机子上使用,显示,连接句柄无效!
有没有办法把odbc连编到vfp中。让别的机子只要装上我的vfp,就可以操作他电脑上的jxc.db呢?
#29
yewxj2019-03-21 09:38
回复 28楼 su0527
目前只能想到安装SQLite的ODBC驱动后,在ODBC数据源中添加SQLite驱动的方法。
#30
su05272019-03-21 19:57
感谢fyyylyl
结帖时漏给分了,
在此特别鸣谢!!!

#31
厨师王德榜2019-03-25 13:54
惭愧,好久没碰VFP,不过年前写了一个异构数据上传的小程序,倒是刚好可以解决这个问题,而且不依赖于odbc驱动。
使用过程如下:

先分析数据源和目标数据,发现目标数据的ID列是主键,但由于是varchar类型,不支持自增长,不能为NULL,
只有本站会员才能查看附件,请 登录

而用户提交的jhxx.dbf 中,没有ID列,也没有提供生成ID列的规则,为了不影响上传,临时把jhxx.dbf中的Remark列,
手工填写了一些不重复的数据,把此作为ID列,用于与目标数据的ID列对应,


#32
厨师王德榜2019-03-25 13:56
以下是程序的启动界面:
只有本站会员才能查看附件,请 登录

以下是上传之后的目标表截图,可以看到已经新增了若干条记录:
只有本站会员才能查看附件,请 登录
#33
厨师王德榜2019-03-25 13:58
详细的过程,写在这个Word文档里:
只有本站会员才能查看附件,请 登录

这个小程序,支持 Excel、DBF、TXT、XML作为数据源(以后还可以扩展,比如Json)
而目标数据,则支持Sqlite、Access、SqlServer、MySql(Oracle还来不及写)
一个小程序,同时解决多种架构之间的数据上传问题。


[此贴子已经被作者于2019-3-25 14:09编辑过]

#34
su05272019-03-27 17:01
回复 33楼 厨师王德榜
太棒了
#35
schtg2019-03-27 21:13
@厨师王德榜,学习,谢谢!
1