Click here to Skip to main content
15,891,423 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
Hey - not entirely sure which section this should be in (ASP.NET/VB.NET), but here goes...
I'm trying to set up a system whereby a distributable client connects to a central online server which hosts a database. The client then retrieves the relevant data and displays it in the window. The (Access 2007) database has been created and is successfully being hosted (localhost for now, IIS 7). Connecting a web-page to a local database with ASP.NET isn't a problem.

However, I've tried every which way to connect to an online database in the client-app with VB, with ADODB, SQL, ODBC etc.
That said, I read somewhere in my searching that it's possible to set up an ASP.NET page to retrieve the data then pass it on to the client. I've got the ASP.NET page ready (I think), but how can this connect with the client? I'd prefer not to bother with:
Dim myAddress As String = "http://localhost/db/My_DB_Readout.aspx"
Dim UWebRequest As Net.HttpWebRequest
Dim UWebResponse As Net.WebResponse
UWebRequest = System.Net.HttpWebRequest.Create(myAddress)
UWebResponse = UWebRequest.GetResponse()
UFileReader = New System.IO.StreamReader(UWebResponse.GetResponseStream)

as I need two-way access - both reading from the DB and writing new or modified data to it.
Any ideas?
Thanks in advance,
icemclean.
Posted

1 solution

The client app can get it via either a HttpWebrequest, or an XMLHttpRequest. The data would come back as xml, and could then be parsed by the client. On the other hand, you could write a webservice that could handle both the web app AND the client app.

Google is your friend.

 
Share this answer
 
v2
Comments
Manfred Rudolf Bihy 13-Jan-11 19:32pm    
Moved from OP's answer:
I've considered that, but it's only a one-way solution: it doesn't provide write-access.
Manfred Rudolf Bihy 13-Jan-11 19:33pm    
Dave Kreskowiak's comment to OP's answer:
A webservice can write to the database so long as you provide methods in the service to do it.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900