Thread: Comunicating with an off site database

  1. #1
    Registered User
    Join Date
    Mar 2005
    Posts
    15

    Comunicating with an off site database

    Hi all, I just had a little question that I was hoping someone here may be able to point me in the right direction with. I want to create a little application that sends data into a database. I know how to interact with a database so that side of things is pretty clear to me but I actually want to send the data from a client machine into a remote database over the internet, probably on a webserver or on an sql server sat at my office. I havent looked into this in any real depth as yet as I am unsure where I should be looking. The only real stipulation I have at the moment is that due to firewall constraints on some of the client machines, I was just wondering whether there was a method that I could use to send the data into the database without having to worry about firewalls and what ports may or may not be open (long story here regarding configuring the firewalls on the client machines but I will spare you the details).

    As an addition to the above, is there any way I might be able to set up communication using some standard web protocol which would facilitate two way communication between the client PC's and the server too? I realise I may be asking a little too much on that one but I thought I would ask anyway

    By the way I am using C# for this hence the reason I posted it in this forum. If its the wrong forum for this kind of thing though I apologise. Anyway sorry for all the speil, hopefully I explained myself properly but let me know if I didnt and I will try to clarify. Many thanks.

  2. #2
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,130
    What kind of database do you have ?
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

  3. #3
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    With regard to sending data to the database via HTTP, I managed this by sending it as an xml document, and having an ASP script at the server end manage the data manipulation. I didnt use NET, but I did use some of windows ActiveX objects to create the xml doc and transmit it. I would be very suprised if these objects werent available to NET in some way - probably in an improved state.

    Of course, you would need to consider security and different methods of manipulating the database - updating, deleting, adding, but it can all be achieved with ASP.

  4. #4
    Registered User
    Join Date
    Jan 2004
    Posts
    37
    The first question is are you going to be sending the entire database each time or just updates? I don't suggest that you send the entire database each time. To get rid of firewall problems you would probably want to use HTTP as the protocol. Next you should develop a web service to pass the data and you can use SOAP to marshal the data. SOAP will allow you to pass a DataSet or a DataTable over http. This may be the easiest way for you to send the data. Yes, serialization of a DataSet or DataTable is fat, but it is the fastest and most maintainable route for you. Any other questions?

    LT

  5. #5
    Registered User
    Join Date
    Mar 2005
    Posts
    15
    Ahh, thanks very much for the input guys. The database is SQL (actually I was going to write a small test app using MSDE until I have all this figured out in my head). In answer to your question CompuRocket, I dont intend to send the database each time in its entirety. I will as you hinted essentially be updating the main database inserting as and when necessary.

    Thanks for the pointers... I had better go read up on soap and xml then I guess

  6. #6
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544
    I think it may be obsolete, but you could check out Remote Data Service. Another article here.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. literature database: help with planning
    By officedog in forum C++ Programming
    Replies: 1
    Last Post: 01-23-2009, 12:34 PM
  2. Creating a database
    By Shamino in forum Game Programming
    Replies: 19
    Last Post: 06-10-2007, 01:09 PM
  3. Replies: 10
    Last Post: 05-18-2006, 11:23 PM