【问题标题】:how to create temporary database table with windev mobile如何使用windev mobile创建临时数据库表
【发布时间】:2015-08-12 07:23:58
【问题描述】:

我使用移动 Windev 和在这个应用程序中创建了一个适用于 android 的应用程序。

我有一个订单输入系统。为此,我使用数组变量将所有客户订单存储在内存中,然后在最后一刻将它们记录到数据库 HyperFile 经典中。

我被要求改变这种做法,而不是通过临时表。所以我记录了包括 HDescribeFile () 不幸的是它不适用于 android。

我使用的是windev mobile 20 和windows 7。 我认为这是很有可能的,但如何呢?我仍然失去了一点,所以我需要你的帮助。 如何为android创建一个经典的hf临时文件WM?

谢谢

【问题讨论】:

    标签: temp-tables windev hyperfilesql


    【解决方案1】:

    你试过这个函数HDescribeFile() 和HDescribeItem() 吗?

    AFile is File Description
    AnItem is Item Description
    CUSTOMER is Data Source
    
    // Describe the "CUSTOMER" data file
    AFile..Name = "CUSTOMER"
    AFile..Type = hFileNormal
    AFile..FicCryptMethod = hCryptStandard
    
    // Describe the "LASTNAME" item
    AnItem..Name = "LASTNAME"
    AnItem..Type = hItemText
    AnItem..Size = 40
    AnItem..KeyType = hUniqueKey
    HDescribeItem(AFile, AnItem)
    
    // Describe the "FIRSTNAME" item
    AnItem..Name = "FIRSTNAME"
    AnItem..Type = hItemText
    AnItem..Size = 40
    HDescribeItem(AFile, AnItem)
    
    // Validates the description of the data file 
    HDescribeFile(AFile)
    ...
    
    // Create the data file named Customer (recognized because declared as data source)
    HCreation(CUSTOMER)
    

    【讨论】:

      【解决方案2】:

      您可以在项目的分析中创建表,并在应用程序首次启动时创建文件。

      建立联系

      CNX_SERVEUR est une Connexion
      CNX_SERVEUR..Utilisateur="admin"
      CNX_SERVEUR..MotDePasse=""
      CNX_SERVEUR..Serveur="192.168.1.5:4900"
      CNX_SERVEUR..BaseDeDonnées = BaseDonnées_Nom
      CNX_SERVEUR..Provider = hAccèsHFClientServeur
      CNX_SERVEUR..Accès = hOLectureEcriture
      CNX_SERVEUR..OptionsCurseur = hCurseurClient
      CNX_SERVEUR..Compression=Faux
      CNX_SERVEUR..Cryptage=hCryptageNon
      

      将文件分配给连接

      SI PAS HChangeConnexion("*",CNX_SERVEUR) ALORS
      Erreur(HErreurInfo(hErrMessage))
      RETOUR
      FIN
      SI PAS HCréationSiInexistant("*",Mon_password,"","",hOuvertureDifférée) ALORS
      Erreur(HErreurInfo(hErrMessage))
      RETOUR
      FIN
      

      服务器连接

      SI PAS HOuvreConnexion(CNX_SERVEUR) ALORS
      Info(HErreurInfo(hErrMessage))
      RETOUR
      FIN
      

      【讨论】:

        猜你喜欢
        • 2017-09-17
        • 2011-02-09
        • 2016-12-03
        • 1970-01-01
        • 1970-01-01
        • 2017-12-26
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多