Android Question Is it possible to connect Android Basic4Android to Access database on local network

Gearcam

Active Member
Licensed User
Longtime User
Is this now possible to connect Basic4Android directly to a Access backend database stored on our local network.

Not over the internet but just using the Wi-Fi available

The last time I did this I had too have an ASPX page running on the remote server but that was over the internet.

Server 2008 R1

Thanks
Steve
 

Gearcam

Active Member
Licensed User
Longtime User
Hi I am not sure how to add a webservice to our server was hoping not to now.

Just looking at jackcess it runs and opens a database stored on the phone now to make it look at the server.

Thanks
Steve
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
IIS is overkill, just combine Jackcess with SMB to access the .mdb over a share.
 
Upvote 0

Gearcam

Active Member
Licensed User
Longtime User
ok ill look into to that route

the backend database is a *.accdb file is that a problem

I also need to know how to make Jackcess point to the server shared directory by IP address ?

Steve
 
Upvote 0

Gearcam

Active Member
Licensed User
Longtime User
can you access a database on a local network server with something like
Path="//10.0.0.37/subdir"
Access.Open(Path & "/Northwind.mdb")

10:0:0:37 being the IP address of the host server
 
Upvote 0

Tron

Member
Licensed User
Longtime User
Yes I´m confident.
I need little time for inst. Office on my servers.
greets Jens
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
you don't need office on the server, the jet engine is part of the mdac.
 
Upvote 0

Gearcam

Active Member
Licensed User
Longtime User
I now have smb working well I can list the files in a dir with credentials all on my phone !!

So now I am trying to use this to link to jackcess without any luck

B4X:
    Dim Path As String
    Path="smb://10.0.0.37/data/"
    Access.Open(Path & "/Northwind.mdb")

this fails file does not exist

any ideas ?

Steve
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
B4X:
Dim Path As String
Path="smb://10.0.0.37/data/"
Access.Open(Path & "/Northwind.mdb")
results in
B4X:
Access.Open("smb://10.0.0.37/data//Northwind.mdb")
are you sure it should work with the two slashes?
 
Upvote 0

Gearcam

Active Member
Licensed User
Longtime User
you are correct thank you
but it does not work

the next line is
Access.Open(Path & "Northwind.mdb")

this now stops !
java.io.FileNotFoundException: given file does not exist: smb:/10.0.0.37/data/Northwind.mdb

It is there so it should find the file ?

steve
 
Upvote 0

Gearcam

Active Member
Licensed User
Longtime User
Access.Open("smb://10.0.0.37/data/Northwind.mdb")

This is what I am using with two //
Or am I misunderstanding you ?

Steve
 
Upvote 0

Gearcam

Active Member
Licensed User
Longtime User
I think this is the wrong path should I be using a aspx file running on the server IIS7 and then JSON to talk to that

what do you all think ?
 
Upvote 0

Tron

Member
Licensed User
Longtime User
Ok.

I've finished the HttpHandler for IIS7 and Access2010(x64) !

(the handler can use any Database, if the appropriate driver is installed and the connectionstring is available)

054.png


e.g. reading the customer table from c:\temp\Nordwind 2007.accdb (for Test purposes)
For a test, see parameters in the web.config and change, if desired carefully ! (notepad++)

You need more info ?

greets Jens
 

Attachments

  • Access.zip
    5 KB · Views: 323
Last edited:
Upvote 0
Top