Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: Database Builder - Load DEF - MSSQLDRV - DateTime(DTM) is suddenly Date(DAT)

  1. #11
    Join Date
    Feb 2009
    Location
    Brazil
    Posts
    5,446

    Default Re: Database Builder - Load DEF - MSSQLDRV - DateTime(DTM) is suddenly Date(DAT)

    Yes! I use only this method.
    Samuel Pizarro

  2. #12

    Default Re: Database Builder - Load DEF - MSSQLDRV - DateTime(DTM) is suddenly Date(DAT)

    Hey Peter van Mil,

    thanks for the suggestion but will that not only change it so that all DFate (DAT) will become SQL:date?
    I need the opposite here.

    Sadly, I don't find any "MAP_SQLDATETIME_TO_DFTYPE DateTime".

  3. #13

    Default Re: Database Builder - Load DEF - MSSQLDRV - DateTime(DTM) is suddenly Date(DAT)

    You mean checking every time?
    Or do you mean the way to "CREATE TABLE" and then adding to filelist?

    It works but I run into following error when connecting to the new table via Builder:
    Error1:
    Click image for larger version. 

Name:	Error1.PNG 
Views:	41 
Size:	8.6 KB 
ID:	10339

    Followed by
    Error2:
    Click image for larger version. 

Name:	Error2.PNG 
Views:	34 
Size:	3.7 KB 
ID:	10340

    and
    Error3:
    Click image for larger version. 

Name:	Error3.PNG 
Views:	35 
Size:	8.8 KB 
ID:	10341

    I then can not open the table because of following error:
    Error4:
    Click image for larger version. 

Name:	Error4.PNG 
Views:	35 
Size:	6.5 KB 
ID:	10342

    and finally
    Error5:
    Click image for larger version. 

Name:	Error5.PNG 
Views:	32 
Size:	3.5 KB 
ID:	10343



    It only works after I delete the new VALUES.int file in the Data-folder and replace it with the values.int of the first workspace.
    (I then have to change the DFCONNID and it works as wanted).

    I do:
    1. In MSSQL Management-Studio I auto-generate a script "CREATE TABLE" for table "VALUES" in a new sql-window.
    2. I change "USE [TestDataBase1]" to "USE [TestDataBase2]" (I previously deleted the table "VALUES" in "TestDataBase2").
    4. I start my workspace / studio -> start the database builder (I previously deleted the entry for that table from the filelist, ofc.)
    5. I click "Connect to SQL Server Database" and choose my table "VALUES".
    6. I only check the thing with the Dummy Date and leave the rest as default.
    7. Error1 on continue (see above).
    8. Next -> Error2 (see above)
    9. Next -> Error3 (see above)
    10. I now try to "Open Table" my new table. That does not work -> Error 4 and Error 5 (see above)
    11. I then delete the "VALUES.int" file in the Data-folder of my second workspace, replace it with the "values.int" file of my first workspace.
    12. I change the connection inside the (new) "values.int".
    13. Again I "Open Table" my new table -> It works.

    Are these errors "normal" and this is the supposed way? Or should I do something differently?
    Thanks in advance. I can live with clicking away errors like that (when in the end everything works fine) but I don't like to do so.

  4. #14
    Join Date
    Feb 2009
    Location
    Maasland, The Netherlands
    Posts
    2,605

    Default Re: Database Builder - Load DEF - MSSQLDRV - DateTime(DTM) is suddenly Date(DAT)

    Hi Pascal,

    But there is a mapping of DataFlex DAT datatypes. You can choose datetime for all DataFlex DAT fields. (I would prefer DAT --> DATE and DateTime --> DateTime2). Maybe you have to check your DEF files. Are they correct?

    Code:
    ; MAP_DFDATE_TO_SQLTYPE datetime
    MAP_DFDATE_TO_SQLTYPE date
    Best regards,

    Peter van Mil
    Appvantage b.v.

  5. #15
    Join Date
    Feb 2009
    Posts
    1,175

    Default Re: Database Builder - Load DEF - MSSQLDRV - DateTime(DTM) is suddenly Date(DAT)

    Did you include the creation of indexes in your create table script?

    In SQL Management Studio you have to turn an option on to include the indexes:
    Tools/Options/SQL Server Object Explorer/Scripting/Script indexes
    (I know, I always forget where it is and always have trouble finding it back...)
    Best regards,
    Data Access Worldwide

    Martin Moleman

  6. #16

    Default Re: Database Builder - Load DEF - MSSQLDRV - DateTime(DTM) is suddenly Date(DAT)

    Hello Martin,

    Thank you very much for the suggestion.

    I found the settings you mentioned.
    Is that (see image below) okay or do you recommended to check everything here?

    Click image for larger version. 

Name:	sql-settings.png 
Views:	42 
Size:	5.0 KB 
ID:	10356

Page 2 of 2 FirstFirst 12

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •