Autore Topic: [Risolto] gb.db.odbc: unable to convert date - Gambas 3.16.0  (Letto 1378 volte)

Offline Gianluigi

  • Moderatore globale
  • Senatore Gambero
  • *****
  • Post: 4.157
  • Tonno verde
    • Mostra profilo
Re:gb.db.odbc: unable to convert date - Gambas 3.16.0
« Risposta #15 il: 25 Aprile 2021, 13:26:30 »
Potresti tirar giù una guida su come si usa il bugtracker...  :P

Questo ( http://gambaswiki.org/wiki/doc/report?l=it ) non è sufficiente?   :P

 ;D
nuoto in attesa del bacio di una principessa che mi trasformi in un gambero azzurro

Offline Gianluigi

  • Moderatore globale
  • Senatore Gambero
  • *****
  • Post: 4.157
  • Tonno verde
    • Mostra profilo
Re:gb.db.odbc: unable to convert date - Gambas 3.16.0
« Risposta #16 il: 25 Aprile 2021, 15:49:26 »

Nel tentativo di fare lo wiki su ODBC, sto cercando di tradurre in italiano il documento scritto da Piccoro, ma purtroppo non ci capisco nulla.
http://gambaswiki.org/wiki/doc/odbc?l=it

Parla di driver del modulo  ??? forse intende modulo del driver? ma non è meglio driver e basta?

« Ultima modifica: 29 Aprile 2021, 12:33:34 da Gianluigi »
nuoto in attesa del bacio di una principessa che mi trasformi in un gambero azzurro

Offline Gianluigi

  • Moderatore globale
  • Senatore Gambero
  • *****
  • Post: 4.157
  • Tonno verde
    • Mostra profilo
Re:gb.db.odbc: unable to convert date - Gambas 3.16.0
« Risposta #17 il: 29 Aprile 2021, 09:18:12 »
milio,

Minisini ti chiede di postare l'intera frase di errore:

Citazione
Posso avere il messaggio di avviso completo? Che è: gb.db.odbc:Unable to convert date: xxxxx Ho bisogno della parte "xxxxx".

Grazie

 :ciao:

approfitto per scusarmi di non aver ancora creato la pagina wiki  :-[
« Ultima modifica: 29 Aprile 2021, 09:21:04 da Gianluigi »
nuoto in attesa del bacio di una principessa che mi trasformi in un gambero azzurro

Offline milio

  • Senatore Gambero
  • ******
  • Post: 1.271
  • Chi parla poco dice tanto...
    • Mostra profilo
Re:gb.db.odbc: unable to convert date - Gambas 3.16.0
« Risposta #18 il: 29 Aprile 2021, 18:47:54 »
Ho fatto un codice che si collega ad una tabella di firebird in odbc in questo modo:

Codice: [Seleziona]
Public Sub Main()
 
  Dim hRes As Result 

  Db.Debug = True ' enable debug messages
  Try hRes = DbMistral.Exec("SELECT * FROM AABI_BANCHE;")
  If Error Then
    Print "Error";; Error.Text;; Error.Code
  Endif
 
End

Il programma non va in errore, solo che nel result dove ci sono date ritorna un valore nullo.... Questo sotto e' il debug della funzione sopra:



Codice: [Seleziona]
2021-04-29 18:40:10.750 gb.db.odbc: GetConnectedDBName: desc->name: NULL
2021-04-29 18:40:11.558 gb.db.odbc: SQLGetStmtAttr SQL_ATTR_ROW_NUMBER
2021-04-29 18:40:11.558 gb.db.odbc: 1:2400:0:[unixODBC][Driver Manager]Invalid cursor state
2021-04-29 18:40:11.558 gb.db.odbc: GetRecordCount: First recno=0
2021-04-29 18:40:11.558 gb.db.odbc: GetRecordCount: Last recno=826
2021-04-29 18:40:11.558 gb.db.odbc: GetRecordCount: Record count=827
2021-04-29 18:40:11.558 gb.db.odbc: do_query: create handle 0x563bf4abc5d0
2021-04-29 18:40:11.558 gb.db.odbc: query_init: 0x563bf49c2348 -> 9 columns
2021-04-29 18:40:11.558 gb.db.odbc: query_make_result: 0x563bf49c2348 (9 columns)
2021-04-29 18:40:11.558 gb.db.odbc: query_make_result: 'AABI_PK' -> type = 12
2021-04-29 18:40:11.558 gb.db.odbc: query_make_result: 'AABI_X' -> type = 1
2021-04-29 18:40:11.558 gb.db.odbc: query_make_result: 'AABI_DMOD' -> type = 93
2021-04-29 18:40:11.558 gb.db.odbc: query_make_result: 'AABI_DCRE' -> type = 93
2021-04-29 18:40:11.558 gb.db.odbc: query_make_result: 'AABI_UMOD' -> type = 12
2021-04-29 18:40:11.558 gb.db.odbc: query_make_result: 'AABI_UCRE' -> type = 12
2021-04-29 18:40:11.558 gb.db.odbc: query_make_result: 'AABI_DES1' -> type = 12
2021-04-29 18:40:11.558 gb.db.odbc: query_make_result: 'AABI_MNEMONICO' -> type = 12
2021-04-29 18:40:11.558 gb.db.odbc: query_make_result: 'AABI_CIN' -> type = 1
2021-04-29 18:40:11.558 gb.odbc: query_fill: 0x563bf49c2348: 0 (0)
2021-04-29 18:40:11.558 gb.db.odbc: query_fill: AABI_PK (12) = 01000
2021-04-29 18:40:11.558 gb.db.odbc: query_fill: AABI_X (1) =
2021-04-29 18:40:11.558 gb.db.odbc: query_fill: AABI_DMOD (93) =
gb.db.odbc: unable to convert date:
2021-04-29 18:40:11.558 gb.db.odbc: query_fill: AABI_DCRE (93) = 2016-09-29 10:50:29
gb.db.odbc: unable to convert date: 2016-09-29 10:50:29
2021-04-29 18:40:11.558 gb.db.odbc: query_fill: AABI_UMOD (12) =
2021-04-29 18:40:11.558 gb.db.odbc: query_fill: AABI_UCRE (12) = andrea
2021-04-29 18:40:11.558 gb.db.odbc: query_fill: AABI_DES1 (12) = BANCA D'ITALIA
2021-04-29 18:40:11.558 gb.db.odbc: query_fill: AABI_MNEMONICO (12) =
2021-04-29 18:40:11.558 gb.db.odbc: query_fill: AABI_CIN (1) =
2021-04-29 18:40:11.686 gb.db.odbc: query_release: 0x563bf49c2348: free handle 0x563bf4abc5d0
« Ultima modifica: 29 Aprile 2021, 18:54:52 da milio »

Offline Gianluigi

  • Moderatore globale
  • Senatore Gambero
  • *****
  • Post: 4.157
  • Tonno verde
    • Mostra profilo
Re:gb.db.odbc: unable to convert date - Gambas 3.16.0
« Risposta #19 il: 29 Aprile 2021, 19:03:00 »
Ok lo riferisco a Benoit Minisini

 :ciao:

Fatto
« Ultima modifica: 29 Aprile 2021, 19:12:10 da Gianluigi »
nuoto in attesa del bacio di una principessa che mi trasformi in un gambero azzurro

Offline Gianluigi

  • Moderatore globale
  • Senatore Gambero
  • *****
  • Post: 4.157
  • Tonno verde
    • Mostra profilo
Re:gb.db.odbc: unable to convert date - Gambas 3.16.0
« Risposta #20 il: 29 Aprile 2021, 23:03:58 »
Minisini scrive questo:
Citazione
Comment #12 by Benoît MINISINI:

It should be fixed in commit https://gitlab.com/gambas/gambas/-/commit/f24f08d941a90eeb9a79b4752bb2424dd9b18b1c, but I can't test.

Can you check and tell me?

Benoît MINISINI changed the state of the bug to: NeedsInfo.

Io non posso testarlo, solo tu lo puoi fare ma occorre che ti scarichi e compili quella master li

 :ciao:
nuoto in attesa del bacio di una principessa che mi trasformi in un gambero azzurro

Offline Gianluigi

  • Moderatore globale
  • Senatore Gambero
  • *****
  • Post: 4.157
  • Tonno verde
    • Mostra profilo
Re:gb.db.odbc: unable to convert date - Gambas 3.16.0
« Risposta #21 il: 30 Aprile 2021, 16:35:23 »
Dopo l'ultima risposta Minisini dice questo:

Citazione
Comment #14 by Benoît MINISINI:

It's normally impossible to have both the "unable to convert date" message and the date converted in the data. Are you sure that you have the right last 'gb.db.odbc' code?

Benoît MINISINI changed the state of the bug to: NeedsInfo.


Cosa rispondi ?

 :ciao:
nuoto in attesa del bacio di una principessa che mi trasformi in un gambero azzurro

Offline Gianluigi

  • Moderatore globale
  • Senatore Gambero
  • *****
  • Post: 4.157
  • Tonno verde
    • Mostra profilo
Re:gb.db.odbc: unable to convert date - Gambas 3.16.0
« Risposta #22 il: 30 Aprile 2021, 18:23:29 »
Una guida a ODBC è stata aggiunta al nostro wiki, grazie all'intercessione di milio  :)

https://www.gambas-it.org/wiki/index.php?title=ODBC

 :ciao:
nuoto in attesa del bacio di una principessa che mi trasformi in un gambero azzurro

Offline milio

  • Senatore Gambero
  • ******
  • Post: 1.271
  • Chi parla poco dice tanto...
    • Mostra profilo
Re:gb.db.odbc: unable to convert date - Gambas 3.16.0
« Risposta #23 il: 30 Aprile 2021, 21:47:33 »
Dal codice che mi ha fatto cambiare ho commentato la riga 607:

Codice: [Seleziona]
fprintf(stderr, "gb.db.odbc: unable to convert date: %.*s\n", len, data);

Stupidamente avevo fatto copia incolla del codice che mi aveva linkato, ma se andavo a scaricare il file gb.db.odbc/src/main.c  quella riga di codice non c'era.

Adesso funziona correttamente

Grazie a tutti



Offline Gianluigi

  • Moderatore globale
  • Senatore Gambero
  • *****
  • Post: 4.157
  • Tonno verde
    • Mostra profilo
Re:gb.db.odbc: unable to convert date - Gambas 3.16.0
« Risposta #24 il: 30 Aprile 2021, 22:16:05 »

Adesso funziona correttamente


Ok vado a riferirlo a Benoit Minisini

 :ciao:
nuoto in attesa del bacio di una principessa che mi trasformi in un gambero azzurro

Offline Gianluigi

  • Moderatore globale
  • Senatore Gambero
  • *****
  • Post: 4.157
  • Tonno verde
    • Mostra profilo
Re:[Risolto] gb.db.odbc: unable to convert date - Gambas 3.16.0
« Risposta #25 il: 02 Maggio 2021, 09:33:25 »
Da ieri la stabile è stata aggiornata e ora ODBC prova a leggere correttamente i campi data.

 :ciao:
« Ultima modifica: 02 Maggio 2021, 09:33:56 da Gianluigi »
nuoto in attesa del bacio di una principessa che mi trasformi in un gambero azzurro

Offline milio

  • Senatore Gambero
  • ******
  • Post: 1.271
  • Chi parla poco dice tanto...
    • Mostra profilo
Re:[Risolto] gb.db.odbc: unable to convert date - Gambas 3.16.0
« Risposta #26 il: 02 Maggio 2021, 22:03:15 »
Non ho capito se hanno aggiornato solo i sorgenti o anche i pacchetti della stabile... Dove hai letto la notizia?

Offline Gianluigi

  • Moderatore globale
  • Senatore Gambero
  • *****
  • Post: 4.157
  • Tonno verde
    • Mostra profilo
Re:[Risolto] gb.db.odbc: unable to convert date - Gambas 3.16.0
« Risposta #27 il: 02 Maggio 2021, 22:14:11 »
Non ho capito se hanno aggiornato solo i sorgenti o anche i pacchetti della stabile... Dove hai letto la notizia?

Da Gambas-Notification:

Codice: [Seleziona]
Benoît Minisini pushed to branch stable at Gambas / gambas
Commits:

    f2004e26
    by gambas at 2021-05-02T02:13:39+02:00

    Try to read date fields correctly in most ODBC drivers.

    [GB.DB.ODBC]
    * BUG: Try to read date fields correctly in most ODBC drivers.

    ed9ef13a
    by gambas at 2021-05-02T02:14:01+02:00

    Don't remove file descriptors watches in the 'quit' hook to behave like Qt components.

    [GB.GTK]
    * BUG: Don't remove file descriptors watches in the 'quit' hook to behave like Qt components.

    [GB.GTK3]
    * BUG: Don't remove file descriptors watches in the 'quit' hook to behave like Qt components.

    4e35ab64
    by gambas at 2021-05-02T02:14:09+02:00

    Abort JIT compilation before executing the QUIT instruction.

    [INTERPRETER]
    * BUG: Abort JIT compilation before executing the QUIT instruction.

    1326e9eb
    by gambas at 2021-05-02T02:14:22+02:00

    Use SIGUSR1, now that SIGUSR2 is used by the Gambas debugger.

    [GB.WEB.GUI]
    * BUG: Use SIGUSR1, now that SIGUSR2 is used by the Gambas debugger.

    e487c87c
    by Christof Thalhofer at 2021-05-02T02:15:33+02:00

    gambas3-selftest comment out Debug symbols

    We should need no Debug any more.

    dfd02d13
    by Christof Thalhofer at 2021-05-02T02:15:42+02:00

    gb.test new test suite 'Production'

    [GB.TEST]
    * NEW: Test suite 'Production' which is called by run.sh.

    The test suite 'Production' excludes tests which are not reliable in all
    circumstances.

    99258f37
    by gambas at 2021-05-02T02:15:56+02:00

    TerminalView: Reset() method does not fail anymore if the currently running process is dead.

    [GB.FORM.TERMINAL]
    * BUG: TerminalView: Reset() method does not fail anymore if the currently running process is dead.

    f8192e24
    by gambas at 2021-05-02T02:16:05+02:00

    Fix a string memory leak in error management.

    [INTERPRETER]
    * BUG: Fix a string memory leak in error management.

    656580eb
    by gambas at 2021-05-02T02:16:12+02:00

    TextEditor: Remove 'tabledragger.js' test file because it is copyrighted..

    [GB.FORM.EDITOR]
    * BUG: TextEditor: Remove 'tabledragger.js' test file because it is copyrighted.

    1f6ac36f
    by Benoît Minisini at 2021-05-02T02:16:30+02:00

    Update .gitlab-ci.yml file

    71fb4919
    by gambas at 2021-05-02T02:16:39+02:00

    Fix compilation on BSD.

    [INTERPRETER]
    * BUG: Fix compilation on BSD systems.

    [GB.FORM]
    * NEW: Search for icon themes in '/usr/local' for BSD systems.

23 changed files:

    .gitlab-ci.yml
    app/src/gambas3-selftest/.src/TestSources/BaseClass.class
    app/src/gambas3-selftest/.src/TestSources/mTest.module
    app/src/gambas3-selftest/.src/Tests/GambasSelftests.test
    app/src/gambas3-selftest/.src/Tests/SlowThousandsProcs.test
    app/src/gambas3-selftest/.src/Tests/Timers.test
    app/src/gambas3-selftest/.test
    app/src/gambas3-selftest/run.sh
    comp/src/gb.form.editor/.component
    comp/src/gb.form.editor/.project
    − comp/src/gb.form.editor/tabledragger.js
    comp/src/gb.form.terminal/.component
    comp/src/gb.form.terminal/.project
    comp/src/gb.form.terminal/.src/TerminalView/TerminalView.class
    comp/src/gb.form/.src/Stock.class
    comp/src/gb.web.gui/.src/WebForm.class
    gb.db.odbc/src/main.c
    gb.gtk/src/main.cpp
    gb.gtk3/src/main.cpp
    main/gbx/gb_error.c
    main/gbx/gbx_c_file.c
    main/gbx/gbx_exec.c
    main/gbx/gbx_string.c


View it on GitLab.
You're receiving this email because of your account on gitlab.com. If you'd like to receive fewer emails, you can adjust your notification settings.



Qui il collegamento a gitlab:
https://gitlab.com/gambas/gambas/-/compare/2ba08a82dee6e42a2853fd9369a7cf804ef6c70a...71fb491985531816b9344fad7442ee0ecbc2e80c
nuoto in attesa del bacio di una principessa che mi trasformi in un gambero azzurro