Italian db2000 ADODB interface

maXim

Active Member
Licensed User
Longtime User
db2000 ADODB interface

db2000 ADODB interface è un piccola DLL che con poche ma semplici funzioni permette la gestione di database compresi quelli MSAccess compatibili (.mdb) utilizzando per l'applicazioni desktop l'assembly di interoperabilità primario (PIA) per ADO (ActiveX Data Objects). Purtroppo, per quello che mi risulta al momento, l'assembly PIA ADO non è presente nelle distribuzioni del .NET Framework ma di solito viene distribuito solo con Visual Studio .NET (ADODB.DLL); pertanto, come già accennato, per utilizzare nelle applicazioni desktop db2000 ADODB interface è necessario procurarsi ed installare il wrapper indicato:(... per fortuna che in internet si trovano tutte le informazioni necessarie.;)

Gli interessati possono scaricare la libreria dal link sottostante, nel file compresso vi è anche un documento pdf che descrive le funzioni presenti nella DLL.
 

Attachments

  • db2000 ADODB interface (CF2).zip
    370.3 KB · Views: 498
Last edited:

Cableguy

Expert
Licensed User
Longtime User
hola maxin


zip file you can not decompress

I had no problem, perhaps it's a browser issue...
Are you using any download accelerator? If so the turn it off, and re-try...
 

manu

Active Member
Licensed User
Longtime User
Thank you Cableguy and maXin.

Now if it works.
 
Last edited:

Aspire89

Member
Licensed User
Thank you, very useful library. :sign0060:
Maybe you have a nice example, it is necessary. :sign0085:
 

mike1967

Active Member
Licensed User
Longtime User
db2000 adodb interface per device

Avrei la necessita di scrivere un'applicazione mobileche accede a dei file Access (.mdb) potreste darmi qualche indicazione in merito ?
Grazie
 

skipper

Member
Licensed User
Select con clausola "like"

Ciao Massimo,
tempo fa ho usato il tuo wrapper e non ho avuto problemi a fare Insert e Update in file .mdb. Non mi era mai capitato di dover usare una "Select" con clausola "like" e pertanto il problema non si era mai posto. Sembra che la clausola LIKE non sia supportata. È una limitazione del framework, un problema/limitazione del wrapper o è mia incapacità?

Ho cercato di usare la stessa sintassi proposta da acCESS, con variazioni sul tema, ma senza risultato.

Select lastname, firstname from customer where ((lastname like "COL*") and (firstname like "FRANCESCO*"))

In acCESS una query di questo tipo estrae tranquillamente, come ben sai

COLombo FRANCESCO
COLaninno FRANCESCO GIUSEPPE
COLnago FRANCESCO
COLnaghi FRANCESCO PIERMARIA
COLaianni... and so on...

Usando il tuo wrapper, la sintassi (e variazioni sul tema) viene digerita senza alcun errore, ma .recordcount restituisce sempre 0.

Dove sbaglio?

Grazie mille
Mimmo
(aka SKIPPER)
 

maXim

Active Member
Licensed User
Longtime User
Ciao skipper,

il wrapper in questione utilizza a pieno lo standard SQL pertanto i caratteri jolly utilizzati in Access * e ? devono essere sostituiti con % e _ (underscore), inoltre le stringhe all'interno della select andranno delimitate con l'apice (') e non con i doppi apici (") ma questo penso che lo avevi già notato...

Saluti e buon lavoro,

Massimo
 

skipper

Member
Licensed User
Ciao Massimo,

grazie mille! mi dai una grande notizia, ero proprio bloccato.

Mi scuso se nel thread "ACCESS/SQL Library" in "Question & help needed", motivando la mia richiesta di aiuto, ho sparso informazioni false sulla presunta incompatibilità dell'operatore Like... mi cospargo il capo di cenere

Grazie ancora!

Mimmo
 

skipper

Member
Licensed User
ReadRows

Ciao Massimo,
scusami ancora, ma sembra che ci sia un problema con ReadRows che io uso dopo aver fatto la query.

La mia query usa un "Select * from...." quindi voglio tutti i campi (le condizoni where adesso funzionano :) ). La mia tabella ha 11 campi, diligentemente preparati da 0 a 10, che io passo come argomento della chiamata.

Poiché mi si verificava un errore di elemento inesistente, al ritorno dalla chiamata, ho provato a controllare la lunghezza dell'array dei valori con ArrayLen e il risultato è stato che il numero di righe corrisponde ai record trovati ma il numero di colonne è 10 e non 11.
'----global
dim arField(11)
arField(0) = "ID"
arField(1) = "COGNOME"
....
arField(10) = "SSN"

dim arFieldValue(0,0)
'-------
nella mia sub
...omississ....

recFound = AdoDB.RecordCount

'--anche se non necessario ridimensionavo arFieldValue

dim arFieldValue(recFound, 11)

arFieldValue() = ReadRows(recFound, arField())

'--readRow ridimensiona arFieldValue()

msgBox(ArrayLen(arFieldValue(), 1) -----> visualizza recFound
msgBox(ArrayLen(arFieldValue(), 2) -----> visualizza 10

e, giurin giuretta, la tabella ha 11 campi.....

Son sicuro che è colpa mia.... dove sbaglio?

Grazie per l'aiuto,
Mimmo
 

maXim

Active Member
Licensed User
Longtime User
Ciao skipper,

nelle righe del tuo programma che hai trascritto nel precedente post c'è qualcosa che non mi torna ma probabilmente questo è dovuto al fatto che non ho la visione completa della tua procedura. Perché non mi contatti via e-mail magari allegandomi parte della procedura interessata?

Saluti,

Massimo

P.S. l'indirizzo della mia e-mail lo trovi in quasi tutti i miei progetti pubblicati.
 

skipper

Member
Licensed User
Ciao Massimo,

ti ringrazio per la tua disponibilità. Lo faccio volentieri così chiarisco anche un altro dubbio sul risultato di ReadRow.

Sono sicuro che sto ciccando qualcosa, ma usando un programmino ad hoc, sono altrettanto certo che ne verrai a capo.

Grazie ancora
Mimmo
 

nl1007

Member
Licensed User
Longtime User
ReadFieldsParameter(1) error

I'm trying to get a list of the fields in a table, and after opening the table with a "Select *.." statement, I use:
Dim Fields(0)
...
Fields() = = objADO.ReadFieldsParameter(1)
But I get an error "Array types do not match".
I tried specifying a string array, but get the same error. Since the same function returns the field count, field names, or field values, then the array must work with different types of return values..
:sign0085:
I wish there was some English help and examples!
 

maXim

Active Member
Licensed User
Longtime User
Hi nl1007,

sorry for the delayed response, but I have been absent for a long time for several reasons...:sign0013:

In new version of Basic4ppc the array management needs to type define of variable used, so the new features were integrated in the functions with the suffix str:

Fields() = objADO.strReadFieldsParameter(1)
 

nl1007

Member
Licensed User
Longtime User
RecordCount, ErrorCheck..

I got the field names, using:
Fields() = objADO.strReadFieldsParameter(1)
but still get an error if I declared Fields() As String..

Next, I opened a table and tried using RecordCount to find out how many records matched the criteria - but got a value of -1 returned.
I got round that by testing for "EOF", and although it worked initally, when I tried to use it again, I got "EOF" immediately - as if it hadn't been reset..
I tried using a using a 'Count(*)' query first, but ErrorCheck(True) still returns "EOF", so I can only retrieve one record. Using 'MoveLast' and 'MoveFirst' didn't fix the 'RecordCount', or the "EOF", so I can't step through the records - because I don't know when I've got to the end!
(I copied the generated SQL into MSAccess, to make sure it was correct)
:sign0085:
Nigel
 
Top