Visualizzazione dei risultati da 1 a 9 su 9
  1. #1

    [ADO] Capire se un campo e' aggiornabile o meno

    Sto facendo delle prove per vedere come riuscire a capire se un campo e' aggiornabile oppure no... pero' pare piu' difficile del previsto... sto provando a usare le property dei fields di un recordset solo che mi ritorna lo stesso identificativo sia per un campo di tipo counter che per uno di tipo recordset....
    Qualcuno sa come si fa a capire l'aggiornabilita' o meno di un campo?

    Inoltre... qualcuno ha una tabella dei vari codici delle property?
    Non e' bello cio' che e' bello... ma che bello che bello che bello...
    Utonter. Il silenzio degli ignoranti

  2. #2
    AFAIK, l'unico campo R/O e' proprio il contatore.

  3. #3
    Ecco... gia' questo e' utile!

    Tu hai per caso idea di come si leggano i valori della proprieta' attribute? un 116 o un 100 a me non dicono molto...
    Non e' bello cio' che e' bello... ma che bello che bello che bello...
    Utonter. Il silenzio degli ignoranti

  4. #4
    Case 0: strReturn = "adEmpty"
    Case 16: strReturn = "adTinyInt"
    Case 2: strReturn = "adSmallInt"
    Case 3: strReturn = "adInteger"
    Case 20: strReturn = "adBigInt"
    Case 17: strReturn = "adUnsignedTinyInt"
    Case 18: strReturn = "adUnsignedSmallInt"
    Case 19: strReturn = "adUnsignedInt"
    Case 21: strReturn = "adUnsignedBigInt"
    Case 4: strReturn = "adSingle"
    Case 5: strReturn = "adDouble"
    Case 6: strReturn = "adCurrency"
    Case 14: strReturn = "adDecimal"
    Case 131: strReturn = "adNumeric"
    Case 11: strReturn = "adBoolean"
    Case 10: strReturn = "adError"
    Case 132: strReturn = "adUserDefined"
    Case 12: strReturn = "adVariant"
    Case 9: strReturn = "adIDispatch"
    Case 13: strReturn = "adIUnknown"
    Case 72: strReturn = "adGUID"
    Case 7: strReturn = "adDate"
    Case 133: strReturn = "adDBDate"
    Case 134: strReturn = "adDBTime"
    Case 135: strReturn = "adDBTimeStamp"
    Case 8: strReturn = "adBSTR"
    Case 129: strReturn = "adChar"
    Case 200: strReturn = "adVarChar"
    Case 201: strReturn = "adLongVarChar"
    Case 130: strReturn = "adWChar"
    Case 202: strReturn = "adVarWChar"
    Case 203: strReturn = "adLongVarWChar"
    Case 128: strReturn = "adBinary"
    Case 204: strReturn = "adVarBinary"
    Case 205: strReturn = "adLongVarBinary"

  5. #5
    Questi sono i tipi dei fields (proprieta' TYPE)... io parlo della proprieta' attribute...

    Nel file adovbs.inc son codificati cosi'

    codice:
    '---- FieldAttributeEnum Values ----
    Const adFldMayDefer = &H00000002
    Const adFldUpdatable = &H00000004
    Const adFldUnknownUpdatable = &H00000008
    Const adFldFixed = &H00000010
    Const adFldIsNullable = &H00000020
    Const adFldMayBeNull = &H00000040
    Const adFldLong = &H00000080
    Const adFldRowID = &H00000100
    Const adFldRowVersion = &H00000200
    Const adFldCacheDeferred = &H00001000
    Solo che il codice attributo di un field e' la somma dei codici dei vari attributi che ha e mi ci perdo...
    Non e' bello cio' che e' bello... ma che bello che bello che bello...
    Utonter. Il silenzio degli ignoranti

  6. #6
    IF singolo_parametro AND parametro_campo THEN
    ' c'e'!!!
    END IF

  7. #7
    OTTIMO!
    Giusto quello che mi serviva... grazie mille! :-)

    PS: Ho messo questo codice
    codice:
    If (adoField.Attributes AND adFldUpdatable) Then
         'Tutto quello che ci devo fare
    End If
    E' giusto vero?
    (Mi funziona ma volevo una conferma...)
    Non e' bello cio' che e' bello... ma che bello che bello che bello...
    Utonter. Il silenzio degli ignoranti

  8. #8

  9. #9
    Grazie ancora! :-)
    Non e' bello cio' che e' bello... ma che bello che bello che bello...
    Utonter. Il silenzio degli ignoranti

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.