Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Foreign Languages > Italian Forum
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

db2000 ADODB interface

Reply
 
LinkBack Thread Tools Display Modes
  #11 (permalink)  
Old 12-02-2009, 11:39 AM
Knows the basics
 
Join Date: Dec 2007
Posts: 76
Default

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
Reply With Quote
  #12 (permalink)  
Old 12-02-2009, 12:56 PM
Knows the basics
 
Join Date: Dec 2007
Posts: 76
Default 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
Reply With Quote
  #13 (permalink)  
Old 12-02-2009, 01:28 PM
maXim's Avatar
Basic4ppc Veteran
 
Join Date: May 2007
Location: Sesto Fiorentino - Florence (Italy)
Posts: 224
Send a message via MSN to maXim Send a message via Skype™ to maXim
Awards Showcase
Beta Tester 
Total Awards: 1
Post

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.
Reply With Quote
  #14 (permalink)  
Old 12-02-2009, 02:37 PM
Knows the basics
 
Join Date: Dec 2007
Posts: 76
Default

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
Reply With Quote
  #15 (permalink)  
Old 06-10-2010, 02:06 PM
Junior Member
 
Join Date: Jul 2009
Location: Derbyshire, UK
Posts: 36
Default 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..

I wish there was some English help and examples!
Reply With Quote
  #16 (permalink)  
Old 11-08-2010, 02:20 PM
maXim's Avatar
Basic4ppc Veteran
 
Join Date: May 2007
Location: Sesto Fiorentino - Florence (Italy)
Posts: 224
Send a message via MSN to maXim Send a message via Skype™ to maXim
Awards Showcase
Beta Tester 
Total Awards: 1
Post

Hi nl1007,

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

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)
Reply With Quote
  #17 (permalink)  
Old 03-10-2011, 10:30 AM
Junior Member
 
Join Date: Jul 2009
Location: Derbyshire, UK
Posts: 36
Default 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)

Nigel
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Listview.dll with and without SQLite-Interface Filippo Additional Libraries 93 05-19-2011 08:11 AM
Serielles Interface Heinz German Forum 20 06-20-2009 04:17 PM
Access to IShellLink Interface? BjornF Questions (Windows Mobile) 1 10-16-2008 07:13 PM
Database Interface jireland Basic4ppc Wishlist 2 01-26-2008 11:23 PM
starter question Re interface colin9876 Questions (Windows Mobile) 3 11-15-2007 02:51 PM


All times are GMT. The time now is 12:59 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0