469,917 Members | 1,489 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,917 developers. It's quick & easy.

"Pushing" and "pulling" data to and from a web server

I am using Visual Studio 2008 w/ VB.NET.

For the database, I am using SQL Server 2005, which is running on a
dedicated server box.

I am creating a WinForms application for a client. It is run on any of
several employees' desktop PCs.

Now, they want to be able to "push" some of the data from the SQL
Server database up to a database on a website (also SQL Server 2005).
This may be done automatically, through some code that runs on the
server, or may be initiated by the user. They will also want to be
able to "pull" data down from the website.

Basically, "pushing" might go something like this...

1) Some "event" occurs in WinForms system. For simplicity, let's say
that the "event" is that someone clicked on a button in the
application.
2) A query is run to pull needed data.
3) Data pulled by the query is "packaged" into a form that can be
"pushed" up to the web server.
4) Code on the web server needs to run at some scheduled interval to
look for pushed data. Even better would be that the web application
would know immediately (through some "trigger" or direct call) that
the data has been pushed up to it.
5) "Pushed" data needs to be pulled into the database on the web
server. This may include deleting or updating existing records, or
adding new ones, to any number of tables.

Pulling data down from the web server would be similar, but reversed.

I would appreciate any insights into a framework or pattern that can
be used to accomplish something like this.

NOTE: I posted this message to another group, but thought this group
might be the better one to post it to.
Feb 22 '08 #1
3 3864
What you're describing is not "pushing" and "pulling." It is "adding,
inserting, updating, and deleting" versus "selecting."

All of this is done quite simply using ADO.Net, whether you are running a
Windows Forms application or a Web application. The only difference is how
the SQL Server is reached.

Since SQL Server is a network database server, you can actually connect to a
SQL Server over the Internet, which is a TCP/IP network, just like your
business's network. In fact, one SQL Server can connect to another directly,
and transmit and receive data to and from it. This does not necessarily mean
that you will be able to. It depends on the security configuration of the
SQL Server you are connecting to. If the SQL Server does not allow
connections over the Internet, which you will have to find out, you may be
able to build an XML Web Service on the web site to interact with it. But
again, you have to know the full situation, including what the security
configuration of the remote SQL Server is, and what the remote connection
options are.

--
HTH,

Kevin Spencer
Chicken Salad Surgeon
Microsoft MVP

"BobRoyAce" <br**@omegasoftwareinc.comwrote in message
news:6c**********************************@c33g2000 hsd.googlegroups.com...
>I am using Visual Studio 2008 w/ VB.NET.

For the database, I am using SQL Server 2005, which is running on a
dedicated server box.

I am creating a WinForms application for a client. It is run on any of
several employees' desktop PCs.

Now, they want to be able to "push" some of the data from the SQL
Server database up to a database on a website (also SQL Server 2005).
This may be done automatically, through some code that runs on the
server, or may be initiated by the user. They will also want to be
able to "pull" data down from the website.

Basically, "pushing" might go something like this...

1) Some "event" occurs in WinForms system. For simplicity, let's say
that the "event" is that someone clicked on a button in the
application.
2) A query is run to pull needed data.
3) Data pulled by the query is "packaged" into a form that can be
"pushed" up to the web server.
4) Code on the web server needs to run at some scheduled interval to
look for pushed data. Even better would be that the web application
would know immediately (through some "trigger" or direct call) that
the data has been pushed up to it.
5) "Pushed" data needs to be pulled into the database on the web
server. This may include deleting or updating existing records, or
adding new ones, to any number of tables.

Pulling data down from the web server would be similar, but reversed.

I would appreciate any insights into a framework or pattern that can
be used to accomplish something like this.

NOTE: I posted this message to another group, but thought this group
might be the better one to post it to.

Feb 22 '08 #2
All of this is done quite simply using ADO.Net, whether you are running a
Windows Forms application or a Web application. The only difference is how
the SQL Server is reached.
I will have to check to see if we can remotely connect to the
website's DB. However, even if we can, I know that the client will not
want to open up access to the local SQL Server DB.
If the SQL Server does not allow
connections over the Internet, which you will have to find out, you may be
able to build an XML Web Service on the web site to interact with it.
So, given restrictions on remote access, a Web Service is the way to
go? I have never worked with Web Services before, so forgive these
next questions if not clear/sensible.

I would presume that a Web Service could provide one or more methods
for "pushing" data up, and one or more method for "pulling" data down.
Is that right?

If I wrote a Web Service application, I would have to "publish" that
application on a website. Is that something that most ISPs with shared
hosting plans allow?

How does this all relate to WCF? Based on the tiny bit I know, I
would, if possible, want to use WCF to accomplish something like this.
Is that so?
Feb 22 '08 #3
Web services or WCF services available on webhost4life, crystaltech shared hosting plans for example. They are both using .net 3.5 now. Probably many others.

WCF services very easy to write once you overcome the initial learning curve. I use a WCF service on webhost4life to do database updates. You can transfer your own objects back and forth very easily.
-------- Original Message --------
>All of this is done quite simply using ADO.Net, whether you are running a
Windows Forms application or a Web application. The only difference is how
the SQL Server is reached.

I will have to check to see if we can remotely connect to the
website's DB. However, even if we can, I know that the client will not
want to open up access to the local SQL Server DB.
>If the SQL Server does not allow
connections over the Internet, which you will have to find out, you may be
able to build an XML Web Service on the web site to interact with it.

So, given restrictions on remote access, a Web Service is the way to
go? I have never worked with Web Services before, so forgive these
next questions if not clear/sensible.

I would presume that a Web Service could provide one or more methods
for "pushing" data up, and one or more method for "pulling" data down.
Is that right?

If I wrote a Web Service application, I would have to "publish" that
application on a website. Is that something that most ISPs with shared
hosting plans allow?

How does this all relate to WCF? Based on the tiny bit I know, I
would, if possible, want to use WCF to accomplish something like this.
Is that so?
Feb 22 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.

By using this site, you agree to our Privacy Policy and Terms of Use.