You can try to enumerate the folders on your device by using NewObjects
AXpack1's (free) OpenDirectory (www.newobjects.com). Something like this:
AddObject "newObjects.utilctls.SFMain", "mySFMain"
Set myFileSys = mySFMain
Set dir = myFileSys.OpenDirectory("/")
For Each i In dir.contents
<.. here you test if the element starts with Cart... or if it matches a
regular expression like "Cart.o de Mem.ria". If it matches, you can store
the folder name in a var and use it to open the DB>
Next
Cheers
Ricardo Carraretto
On Mon, Feb 2, 2009 at 11:19 PM, margubra <[email protected]> wrote:
> work in the pocket in a path like "\IBFMEM36\teste.db", but not in the
> card in a path like "\Cartão de Memória\IBFMEM36\teste.db"
> with the path confirmed by pasta=main.GetFilePath(CurrentPath)
>
> --- In [email protected] <nsbasic-ce%40yahoogroups.com>, Thomas
> Gruber <computerhu...@...>
> wrote:
>
> >
> > Hello,
> > can you use the form ..\filename or .\filename, if the software is
> > installed on the memory card as well?
> > Kind regards
> > Thomas
> >
> > Am 01.02.2009 um 02:31AM schrieb margubra:
> >
> > >
> > > the sub work fine if the "pasta" (path) is "\IBFMEM36\teste.db", but
> > > if pasta="\Cartão de Memória\IBFMEM36\teste.db", the software don't
> > > find the database.
> > > The path is from main.GetFilePath
> > > I think that the problem is the accentuated caracters "ã" and "ó", but
> > > I can't change.
> > > Any alternative to find the database in the same path than the
> > > software?
> > >
> > > Sub openDatabase
> > > Dim pasta
> > > pasta=main.GetFilePath(CurrentPath)
> > > pasta=pasta+"\teste.db"
> > > MsgBox pasta
> > > 'pasta="\Cartão de Memória\IBFMEM36\teste.db"
> > > MsgBox pasta
> > > If db.Open(pasta) Then
> > > db.AutoType = True
> > > db.TypeInfoLevel = 4
> > > Else
> > > MsgBox "Não Foi aberto o Banco de Dados: " & db.lastError
> > > End If
> > > On Error resume next
> > >
> > > End Sub
> > >
> > >
> > >
> >
>
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"nsb-ce" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nsb-ce?hl=en
-~----------~----~----~----~------~----~------~--~---