C Board  

Go Back   C Board > General Programming Boards > C# Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 07-30-2005, 07:11 AM   #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.
Lee134 is offline   Reply With Quote
Old 08-02-2005, 02:10 AM   #2
the hat of redundancy hat
 
nvoigt's Avatar
 
Join Date: Aug 2001
Location: Hannover, Germany
Posts: 2,769
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.
nvoigt is offline   Reply With Quote
Old 08-02-2005, 03:38 AM   #3
&TH of undefined behavior
 
Fordy's Avatar
 
Join Date: Aug 2001
Posts: 5,219
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.
__________________
"If A is success in life, then A equals x plus y plus z. Work is x; y is play; and z is keeping your mouth shut."
Albert Einstein (1879 - 1955)


Board Rules
Fordy is offline   Reply With Quote
Old 08-02-2005, 07:53 AM   #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
CompURocket is offline   Reply With Quote
Old 08-02-2005, 10:37 AM   #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
Lee134 is offline   Reply With Quote
Old 08-02-2005, 10:49 AM   #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.
anonytmouse is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
literature database: help with planning officedog C++ Programming 1 01-23-2009 12:34 PM
Creating a database Shamino Game Programming 19 06-10-2007 01:09 PM
Struct with a ptr to a dynamically allocated array of other structures :( michael- C Programming 10 05-18-2006 11:23 PM


All times are GMT -6. The time now is 10:17 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22